Part Number Hot Search : 
NSPA310S 05200 1100J 5V0L6US BZX84C 2SB0789 FAN8001 HC244ADW
Product Description
Full Text Search
 

To Download W77IE58 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  p relimin ary W77IE58 8 - bit microcontrolle r publication release date: july 2000 - 1 - revision a1 table of contents -- general description ................................ ................................ ................................ .............. 2 features ................................ ................................ ................................ ................................ ... 2 pin configurations ................................ ................................ ................................ ................. 3 pin description ................................ ................................ ................................ ........................ 4 block diagram ................................ ................................ ................................ ......................... 6 functional descripti on ................................ ................................ ................................ .......... 7 memory organization ................................ ................................ ................................ ............. 9 instruction ................................ ................................ ................................ ................................ . 32 instructiiontiming ................................ ................................ ................................ ....................... 41 power management ................................ ................................ ................................ ................... 49 reset conditions ................................ ................................ ................................ ....................... 52 reset state ................................ ................................ ................................ ............................... 53 programmable timers/ counters ................................ ................................ ....................... 57 timed access protect ion ................................ ................................ ................................ ..... 75 on - chip flash rom ch ar acteristics ................................ ................................ ................... 76 security bits ................................ ................................ ................................ ........................... 78 absolute maximum rat ings ................................ ................................ ................................ ... 79 dc electrical character istics ................................ ................................ ......................... 80 ac electrical charac teristics ................................ ................................ ........................... 82 timing waveforms ................................ ................................ ................................ .................. 85 typical application circuits ................................ ................................ ................................ 87 expanded external program memory and crystal ................................ ................................ ......... 87 expanded external data memory and oscillator ................................ ................................ ........... 88 package dimensions ................................ ................................ ................................ .............. 88 40 - pin dip ................................ ................................ ................................ ................................ . 88 44 - pin pl cc ................................ ................................ ................................ .............................. 89
p reliminary W77IE58 - 2 - general description the W77IE58 is a fast 8051 compatible microcontroller with a redesigned processor core without wasted clock and memory cycles. as a result, it executes every 8051 instruction faster than the origin al 8051 for the same crystal speed. typically, the instruction executing time of W77IE58 is 1.5 to 3 times faster then that of traditional 8051, depending on the type of instruction. in general, the overall performance is about 2.5 times better than the or iginal for the same crystal speed. giving the same throughput with lower clock speed, power consumption has been improved. consequently, the W77IE58 is a fully static cmos design; it can also be operated at a lower crystal clock. the W77IE58 contains 32 kb flash multiple - time programmable flash rom, and provides operating voltage from 2.7v to 5.5v. all W77IE58 types also support on - chip 1 kb sram without external memory component and glue logic, saving more i/o pins for users? application usage if they use on - chip sram instead of external sram. features 8 - bit cmos microcontroller high speed architecture of 4 clocks/machine cycle runs up to 25 mhz pin compatible with standard 80c52 instruction - set compatible with mcs - 51 four 8 - bit i/o ports one ex tra 4 - bit i/o port and wait state control signal (available on 44 - pin plcc/qfp package) three 16 - bit timers 12 interrupt sources with two levels of priority on - chip oscillator and clock circuitry two enhanced full duplex serial ports 32 kb flash multiple - time programmable( flash) rom 256 bytes scratch - pad ram 1 kb on - chip sram for movx instruction programmable watchdog timer dual 16 - bit data pointers software programmable access cycle to external ram/peripherals packages: - dip 40: w7 7ie58 - 25 - plcc 44: W77IE58p - 25
p reliminary W77IE58 publication release date: july 2000 - 3 - revision a1 pin configurations vdd 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 39 40 34 35 36 37 38 30 31 32 33 26 27 28 29 21 22 23 24 25 p0.0, ad0 p0.1, ad1 p0.2, ad2 p0.3, ad3 p0.4, ad4 p0.5, ad5 p0.6, ad6 p0.7, ad7 ea ale psen p2.5, a13 p2.6, a14 p2.7, a15 p2.0, a8 p2.1, a9 p2.2, a10 p2.3, a11 p2.4, a12 t2, p1.0 40-pin dip (W77IE58) rxd1, p1.2 txd1, p1.3 int2, p1.4 int3, p1.5 int4, p1.6 rxd, p3.0 txd, p3.1 int5, p1.7 rst int0, p3.2 int1, p3.3 t0, p3.4 t1, p3.5 wr, p3.6 rd, p3.7 xtal1 xtal2 vss t2ex, p1.1 44-pin plcc (W77IE58p) 40 2 1 44 43 42 41 6 5 4 3 39 38 37 36 35 34 33 32 31 30 29 p0.4, ad4 p0.5, ad5 p0.6, ad6 p0.7, ad7 ea p4.1 ale psen p2.7, a15 p2.6, a14 p2.5, a13 28 27 26 25 24 23 22 21 20 19 18 17 10 9 8 7 14 13 12 11 16 15 int3, p1.5 int4, p1.6 int5, p1.7 rst rxd, p3.0 p4.3 txd, p3.1 int0, p3.2 int1, p3.3 t0, p3.4 t1, p3.5 x t a l 1 v s s p 2 . 4 , a 1 2 p 2 . 3 , a 1 1 p 2 . 2 , a 1 0 p 2 . 1 , a 9 p 2 . 0 , a 8 x t a l 2 p 3 . 7 , / r d p 3 . 6 , / w r a d 3 , p 0 . 3 t 2 , p 1 . 0 p 1 . 2 v d d a d 2 , p 0 . 2 a d 1 , p 0 . 1 a d 0 , p 0 . 0 t 2 e x , p 1 . 1 p 1 . 3 p 1 . 4 , x d 1 r , x d 1 t , n t 2 i p 4 . 2 p 4 . 0 , / w a i t
p reliminary W77IE58 - 4 - pin description symbol type descriptions ea i external access enable: this pin forces the processor to execute out of external rom. it should be kept high to access internal rom. the rom address and data will not be present on the bus if ea pin is high and the program counter is within 32 kb area. otherwise they will be present on the bus. psen o program store enable: psen enables the external rom data onto the port 0 address/data bus during fetch and movc operations. when internal rom access is performed, no psen strobe signal outputs from this pin. ale o address latch enable: al e is used to enable the address latch that separates the address from the data on port 0. rst i reset: a high on this pin for two machine cycles while the oscillator is running resets the device. xtal1 i crystal1: this is the crystal oscillator input. this pin may be driven by an external clock. xtal2 o crystal2: this is the crystal oscillator output. it is the inversion of xtal1. v ss i ground: ground potential v dd i power supply: supply voltage for operation. p0.0 - p0.7 i/o port 0: port 0 is an ope n - drain bi - directional i/o port. this port also provides a multiplexed low order address/data bus during accesses to external memory. p1.0 - p1.7 i/o port 1: port 1 is a bi - directional i/o port with internal pull - ups. the bits have alternate functions whic h are described below: t2(p1.0): timer/counter 2 external count input t2ex(p1.1): timer/counter 2 reload/capture/direction control rxd1(p1.2): serial port 2 rxd txd1(p1.3): serial port 2 txd int2(p1.4): external interrupt 2 int3 (p1.5): external interrupt 3 int4 (p1.6): external interrupt 4 int5 (p1.7): external interrupt 5 p2.0 - p2.7 i/o port 2: port 2 is a bi - directional i/o port with internal pull - ups. this port also provides the upper address bits for accesses to e xternal memory.
p reliminary W77IE58 publication release date: july 2000 - 5 - revision a1 pin description, continued symbol type descriptions p3.0 - p3.7 i/o port 3: port 3 is a bi - directional i/o port with internal pull - ups. all bits have alternate functions, which are described below: rxd (p3.0) : serial port 0 input txd ( p3.1) : serial port 0 output int 0 (p3.2) : external interrupt 0 int 1 (p3.3) : external interrupt 1 t0 (p3.4) : timer 0 external input t1 (p3.5) : timer 1 external input wr (p3.6) : external data memory write strobe rd (p3.7) : external data memory read strobe p4.0 - p4.3 i/o port 4: port 4 is a 4 - bit bi - directional i/o port. the p4.0 also provides the alternate function wait which is the wait state cont rol signal. * note: type i: input, o: output, i/o: bi - directional.
p reliminary W77IE58 - 6 - block diagram address bus p3.0 p3.7 p1.0 p1.7 alu port 0 latch port 1 latch timer 1 timer 0 port 0 port 1 2 uarts xtal1 psen ale gnd v cc rst xtal2 oscillator interrupt psw instruction decoder & sequencer reset block bus & lock controller 32kb rom sfr ram address power control & power monitor 256 bytes ram & sfr stack pointer b addr. reg. incrementor pc temp reg. dptr 1 t2 register t1 register acc port 3 latch port 3 p0.0 p0.7 port 2 latch port 2 p2.0 p2.7 timer 2 1kb sram dptr watchdog timer port 4 latch port 4 p4.0 p4.3
p reliminary W77IE58 publication release date: july 2000 - 7 - revision a1 functional descripti on the W77IE58 is 8052 pin compatible and instruction set compatible. it includes the resources of the standard 8052 such as four 8 - bit i/o ports, three 16 - bit timer/counters, full duplex serial port and interrupt sources. the W77IE58 features a faster running and better performance 8 - bit cpu with a redesigned core processor without wasted clock and memory cycles. it improves the pe rformance not just by running at high frequency but also by reducing the machine cycle duration from the standard 8052 period of twelve clocks to four clock cycles for the majority of instructions. this improves performance by an average of 1.5 to 3 times. the W77IE58 also provides dual data pointers (dptrs) to speed up block data memory transfers. it can also adjust the duration of the movx instruction (access to off - chip data memory) between two machine cycles and nine machine cycles. this flexibility all ows the W77IE58 to work efficiently with both fast and slow rams and peripheral devices. in addition, the W77IE58 contains on - chip 1kb movx sram, the address of which is between 0000h and 03ffh. it only can be accessed by movx instruction; this on - chip sra m is optional under software control. the W77IE58 is an 8052 compatible device that gives the user the features of the original 8052 device, but with improved speed and power consumption characteristics. it has the same instruction set as the 8051 family, with one addition: dec dptr (op - code a5h, the dptr is decreased by 1). while the original 8051 family was designed to operate at 12 clock periods per machine cycle, the W77IE58 operates at a much reduced clock rate of only 4 clock periods per machine cycle . this naturally speeds up the execution of instructions. consequently, the W77IE58 can run at a higher speed as compared to the original 8052, even if the same crystal is used. since the W77IE58 is a fully static cmos design, it can also be operated at a lower crystal clock, giving the same throughput in terms of instruction execution, yet reducing the power consumption. the 4 clocks per machine cycle feature in the W77IE58 is responsible for a three - fold increase in execution speed. the W77IE58 has all th e standard features of the 8052, and has a few extra peripherals and features as well. i/o ports the W77IE58 has four 8 - bit ports and one extra 4 - bit port. port 0 can be used as an address/data bus when external program is running or external memory/device is accessed by movc or movx instruction. in these cases, it has strong pull - ups and pull - downs, and does not need any external pull - ups. otherwise it can be used as a general i/o port with open - drain circuit. port 2 is used chiefly as the upper 8 - bits of the address bus when port 0 is used as an address/data bus. it also has strong pull - ups and pull - downs when it serves as an address bus. port 1 and 3 act as i/o ports with alternate functions. port 4 is only available on 44 - pin plcc/qfp package type. it se rves as a general purpose i/o port as port 1 and port 3. the p4.0 has an alternate function wait which is the wait state control signal. when wait state control signal is enabled, p4.0 is input only. serial i/o the W77IE58 has two enhanc ed serial ports that are functionally similar to the serial port of the original 8052 family. however the serial ports on the W77IE58 can operate in different modes in order to obtain timing similarity as well. note that the serial port 0 can use timer 1 o r 2 as baud rate generator, but the serial port 1 can only use timer 1 as baud rate generator . the serial ports have the enhanced features of automatic address recognition and frame error detection.
p reliminary W77IE58 - 8 -
p reliminary W77IE58 publication release date: july 2000 - 9 - revision a1 timers the W77IE58 has three 16 - bit timers that are func tionally similar to the timers of the 8052 family. when used as timers, they can be set to run at either 4 clocks or 12 clocks per count, thus providing the user with the option of operating in a mode that emulates the timing of the original 8052. the w77i e58 has an additional feature, the watchdog timer. this timer is used as a system monitor or as a very long time period timer. interrupts the interrupt structure in the W77IE58 is slightly different from that of the standard 8052. due to the presence of ad ditional features and peripherals, the number of interrupt sources and vectors has been increased. the W77IE58 provides 12 interrupt resources with two priority level, including six external interrupt sources, timer interrupts, serial i/o interrupts. data pointers the original 8052 had only one 16 - bit data pointer (dpl, dph). in the W77IE58, there is an additional 16 - bit data pointer (dpl1, dph1). this new data pointer uses two sfr locations which were unused in the original 8052. in addition there is an ad ded instruction, dec dptr (op - code a5h), which helps in improving programming flexibility for the user. power management like the standard 80c52, the W77IE58 also has idle and power down modes of operation. the W77IE58 provides a new economy mode which all ow user to switch the internal clock rate divided by either 4, 64 or 1024. in the idle mode, the clock to the cpu core is stopped while the timers, serial ports and interrupts clock continue to operate. in the power down mode, all the clock are stopped and the chip operation is completely stopped. this is the lowest power consumption state. on - chip data sram the W77IE58 has 1k bytes of data space sram which is read/write accessible and is memory mapped. this on - chip movx sram is reached by the movx instruct ion. it is not used for executable program memory. there is no conflict or overlap among the 256 bytes scratchpad ram and the 1k bytes movx sram as they use different addressing modes and separate instructions. the on - chip movx sram is enabled by setting t he dme0 bit in the pmr register. after a reset, the dme0 bit is cleared such that the on - chip movx sram is disabled, and all data memory spaces 0000h - ffffh access to the external memory. memory organization the W77IE58 separates the memory into two separat e sections, the program memory and the data memory. the program memory is used to store the instruction op - codes, while the data memory is used to store data or for memory mapped devices. program memory the program memory on the W77IE58 can be up to 64 kby tes long. there is also on - chip rom which can be used similarly to that of the 8052, except that the rom size is 32 kbytes. all instructions are
p reliminary W77IE58 - 10 - fetched for execution from this memory area. the movc instruction can also access this memory region. exceedin g the maximum address of on - chip rom will access the external memory.
p reliminary W77IE58 publication release date: july 2000 - 11 - revision a1 data memory the W77IE58 can access up to 64kbytes of external data memory. this memory region is accessed by the movx instructions. unlike the 8051 derivatives, the W77IE58 contains on - chip 1k bytes movx sram of data memory, which can only be accessed by movx instructions. these 1k bytes of sram are between address 0000h and 03ffh. access to the on - chip movx sram is optional under software control. when enabled by software, any movx inst ruction that uses this area will go to the on - chip ram. movx addresses greater than 03ffh automatically go to external memory through port 0 and 2. when disabled, the 1kb memory area is transparent to the system memory map. any movx directed to the space b etween 0000h and ffffh goes to the expanded bus on port 0 and 2. this is the default condition. in addition, the W77IE58 has the standard 256 bytes of on - chip scratchpad ram. this can be accessed either by direct addressing or by indirect addressing. there are also some special function registers (sfrs), which can only be accessed by direct addressing. since the scratchpad ram is only 256 bytes, it can be used only when data contents are small. in the event that larger data contents are present, two selecti ons can be used. one is on - chip movx sram , the other is the external data memory. the on - chip movx sram can only be accessed by a movx instruction, the same as that for external data memory. however, the on - chip ram has the fastest access times. 0000h ffffh 80h 7fh 00h 64 k bytes external data memory indirect addressing ram direct & indirect addressing ram sfrs direct addressing ffh ffffh 0000h external program memory 7fffh 32k bytes on-chip program memory 1k bytes on-chip sram 0000h 03ffh figure 1. memory map
p reliminary W77IE58 - 12 - ffh 80h 7fh 30h 2fh 2eh 2dh 2ch 2bh 2ah 29h 28h 27h 26h 25h 24h 23h 22h 21h 20h 1fh 18h 17h 10h 0fh 08h 07h 00h 78 79 7a 7b 7c 7d 7e 7f 70 71 72 73 74 75 76 77 68 69 6a 6b 6c 6d 6e 6f 60 61 62 63 64 65 66 67 58 59 5a 5b 5c 50 51 52 53 54 5d 5e 5f 55 56 57 48 49 4a 4b 4c 4d 4e 4f 40 41 42 43 44 45 46 47 38 39 3a 3b 3c 3d 3e 3f 30 31 32 33 34 35 36 37 28 29 2a 2b 2c 2d 2e 2f 20 21 22 23 24 25 26 27 18 19 1a 1b 1c 1d 1e 1f 10 11 12 13 14 15 16 17 08 09 0a 0b 0c 0d 0e 0f 00 01 02 03 04 05 06 07 indirect ram direct ram bank 3 bank 2 bank 1 bank 0 bit addressable 20h - 2fh figure 2. scratchpad ram/register addressing special function registers the W77IE58 uses special function registers (sfrs) to control and monitor peripherals and their modes. the sfrs reside in the r egister locations 80 - ffh and are accessed by direct addressing only. some of the sfrs are bit addressable. this is very useful in cases where one wishes to modify a particular bit without changing the others. the sfrs that are bit addressable are those who se addresses end in 0 or 8. the W77IE58 contains all the sfrs present in the standard 8052. however, some additional sfrs have been added. in some cases unused bits in the original 8052 have been given new functions. the list of sfrs is as follows. the tab le is condensed with eight locations per row. empty locations indicate that there are no registers at these addresses. when a bit or register is not implemented, it will read high.
p reliminary W77IE58 publication release date: july 2000 - 13 - revision a1 table 1. special function register location table f8 eip f0 b e8 eie e0 acc d8 wdcon d0 psw c8 t2con t2mod rcap2l rcap2h tl2 th2 c0 scon1 sbuf1 rommap pmr status ta b8 ip saden saden1 b0 p3 a8 ie saddr saddr1 a0 p2 p4 98 scon0 sbuf 90 p1 exif 88 tcon tmod tl0 tl1 th0 th1 ckcon 80 p0 sp dpl dph dpl1 dph1 dps pcon note: the sfrs in the column with dark borders are bit - addressable. a brief description of the sfrs now follows. port 0 bit: 7 6 5 4 3 2 1 0 p0.7 p0.6 p0.5 p0.4 p0.3 p0.2 p 0.1 p0.0 mnemonic: p0 address: 80h port 0 is an open - drain bi - directional i/o port. this port also provides a multiplexed low order address/data bus during accesses to external memory. stack pointer bit: 7 6 5 4 3 2 1 0 sp.7 sp.6 sp.5 sp.4 sp.3 sp. 2 sp.1 sp.0 mnemonic: sp address: 81h the stack pointer stores the scratchpad ram address where the stack begins. in other words, it always points to the top of the stack.
p reliminary W77IE58 - 14 - data pointer low bit: 7 6 5 4 3 2 1 0 dpl.7 dpl.6 dpl.5 dpl.4 dpl.3 dpl.2 d pl.1 dpl.0 mnemonic: dpl address: 82h this is the low byte of the standard 8052 16 - bit data pointer. data pointer high bit: 7 6 5 4 3 2 1 0 dph.7 dph.6 dph.5 dph.4 dph.3 dph.2 dph.1 dph.0 mnemonic: dph address: 83h this is the high byte of th e standard 8052 16 - bit data pointer. data pointer low1 bit: 7 6 5 4 3 2 1 0 dpl1.7 dpl1.6 dpl1.5 dpl1.4 dpl1.3 dpl1.2 dpl1.1 dpl1.0 mnemonic: dpl1 address: 84h this is the low byte of the new additional 16 - bit data pointer that has been added to th e W77IE58. the user can switch between dpl, dph and dpl1, dph1 simply by setting register dps = 1. the instructions that use dptr will now access dpl1 and dph1 in place of dpl and dph. if they are not required they can be used as conventional register loca tions by the user. data pointer high1 bit: 7 6 5 4 3 2 1 0 dph1.7 dph1.6 dph1.5 dph1.4 dph1.3 dph1.2 dph1.1 dph1.0 mnemonic: dph1 address: 85h this is the high byte of the new additional 16 - bit data pointer that has been added to the W77IE58. the us er can switch between dpl, dph and dpl1, dph1 simply by setting register dps = 1. the instructions that use dptr will now access dpl1 and dph1 in place of dpl and dph. if they are not required they can be used as conventional register locations by the user . data pointer select bit: 7 6 5 4 3 2 1 0 - - - - - - - dps.0 mnemonic: dps address: 86h dps.0: this bit is used to select either the dpl,dph pair or the dpl1,dph1 pair as the active data pointer. when set to 1, dpl1, dph1 will be selected, otherwi se dpl,dph will be selected.
p reliminary W77IE58 publication release date: july 2000 - 15 - revision a1 dps.1 - 7:these bits are reserved, but will read 0. power control bit: 7 6 5 4 3 2 1 0 sm0d smod0 - - gf1 gf0 pd idl mnemonic: pcon address: 87h smod : this bit doubles the serial port baud rate in mode 1, 2, and 3 when s et to 1. smod0: framing error detection enable: when smod0 is set to 1, then scon.7(scon1.7) indicates a frame error and acts as the fe(fe_1) flag. when smod0 is 0, then scon.7(scon1.7) acts as per the standard 8052 function. gf1 - 0: these two bits are gene ral purpose user flags. pd: setting this bit causes the W77IE58 to go into the power down mode. in this mode all the clocks are stopped and program execution is frozen. idl: setting this bit causes the W77IE58 to go into the idle mode. in this mode the clo cks to the cpu are stopped, so program execution is frozen. but the clock to the serial, timer and interrupt blocks is not stopped, and these blocks continue operating. timer condtrol bit: 7 6 5 4 3 2 1 0 tf1 tr1 tf0 tr0 ie1 it1 ie0 it0 mnemonic: tcon address: 88h tf1: timer 1 overflow flag: this bit is set when timer 1 overflows. it is cleared automatically when the program does a timer 1 interrupt service routine. software can also set or clear this bit. tr1: timer 1 run control: this bit is set or cleared by software to turn timer/counter on or off. tf0: timer 0 overflow flag: this bit is set when timer 0 overflows. it is cleared automatically when the program does a timer 0 interrupt service routine. software can also set or clear this bit. tr0: t imer 0 run control: this bit is set or cleared by software to turn timer/counter on or off. ie1: interrupt 1 edge detect: set by hardware when an edge/level is detected on int 1 . this bit is cleared by hardware when the service routine is vectored to only if the interrupt was edge triggered. otherwise it follows the pin. it1: interrupt 1 type control: set/cleared by software to specify falling edge/ low level triggered external inputs. ie0: interrupt 0 edge detect: set by hardware when an edge/level is detected on int 0 . this bit is cleared by hardware when the service routine is vectored to only if the interrupt was edge triggered. otherwise it follows the pin. it0: interrupt 0 type control: set/cleared by software to spe cify falling edge/ low level triggered external inputs.
p reliminary W77IE58 - 16 - timer mode control bit: 7 6 5 4 3 2 1 0 gate c t / m1 m0 gate c t / m1 m0 timer1 timer0 mnemonic: tmod address: 89h gate: gating control: when this bit is set, timer/counter x is enabled only while intx pin is high and trx control bit is set. when cleared, timer x is enabled whenever trx control bit is set. c t / : timer or counter select: when cleared, the ti mer is incremented by internal clocks. when set , the timer counts high - to - low edges of the tx pin. m1, m0: mode select bits: m1 m0 mode 0 0 mode 0: 8 - bits with 5 - bit prescale. 0 1 mode 1: 18 - bits, no prescale. 1 0 mode 2: 8 - bits with auto - reload from t hx 1 1 mode 3: (timer 0) tl0 is an 8 - bit timer/counter controlled by the standard timer 0 control bits. th0 is a 8 - bit timer only controlled by timer 1 control bits. (timer 1) timer/counter is stopped. timer 0 lsb bit: 7 6 5 4 3 2 1 0 tl0.7 tl0.6 tl0.5 tl0.4 tl0.3 tl0.2 tl0.1 tl0.0 mnemonic: tl0 address: 8ah tl0.7 - 0: timer 0 lsb timer 1 lsb bit: 7 6 5 4 3 2 1 0 tl1.7 tl1.6 tl1.5 tl1.4 tl1.3 tl1.2 tl1.1 tl1.0 mnemonic: tl1 address: 8bh tl1.7 - 0: timer 1 lsb timer 0 msb bit: 7 6 5 4 3 2 1 0 th0.7 th0.6 th0.5 th0.4 th0.3 th0.2 th0.1 th0.0 mnemonic: th0 address: 8ch
p reliminary W77IE58 publication release date: july 2000 - 17 - revision a1 th0.7 - 0: timer 0 msb timer 1 msb bit: 7 6 5 4 3 2 1 0 th1.7 th1.6 th1.5 th1.4 th1.3 th1.2 th1.1 th1.0 mnemonic: th1 address: 8dh th1.7 - 0: timer 1 msb clock control bi t: 7 6 5 4 3 2 1 0 wd1 wd0 t2m t1m t0m md2 md1 md0 mnemonic: ckcon address: 8eh wd1 - 0: watchdog timer mode select bits: these bits determine the time - out period for the watchdog timer. in all four time - out options the reset time - out is 512 clocks mo re than the interrupt time - out period. wd1 wd0 interrupt time - out reset time - out 0 0 2 17 2 17 + 512 0 1 2 20 2 20 + 512 1 0 2 23 2 23 + 512 1 1 2 26 2 26 + 512 t2m: timer 2 clock select: when t2m is set to 1, timer 2 uses a divide by 4 clock, and when set t o 0 it uses a divide by 12 clock. t1m: timer 1 clock select: when t1m is set to 1, timer 1 uses a divide by 4 clock, and when set to 0 it uses a divide by 12 clock. t0m: timer 0 clock select: when t0m is set to 1, timer 0 uses a divide by 4 clock, and when set to 0 it uses a divide by 12 clock. md2 - 0: stretch movx select bits: these three bits are used to select the stretch value for the movx instruction. using a variable movx length enables the user to access slower external memory devices or peripherals w ithout the need for external circuits. the rd or wr strobe will be stretched by the selected interval. when accessing the on - chip sram, the movx instruction is always in 2 machine cycles regardless of the stretch s etting. by default, the stretch has value of 1. if the user needs faster accessing, then a stretch value of 0 should be selected. md2 md1 md0 stretch value movx duration 0 0 0 0 2 machine cycles 0 0 1 1 3 machine cycles (default) 0 1 0 2 4 machine cycles 0 1 1 3 5 machine cycles 1 0 0 4 6 machine cycles 1 0 1 5 7 machine cycles
p reliminary W77IE58 - 18 - 1 1 0 6 8 machine cycles 1 1 1 7 9 machine cycles
p reliminary W77IE58 publication release date: july 2000 - 19 - revision a1 port 1 bit: 7 6 5 4 3 2 1 0 p1.7 p1.6 p1.5 p1.4 p1.3 p1.2 p1.1 p1.0 mnemonic: p1 address: 90h p1.7 - 0: general purpose i/o port. most instructions will read the port pins in case of a port read access, however in case of read - modify - write instructions, the port latch is read. some pins also have alternate input or output functio ns. this alternate functions are described below: p1.0 : t2 external i/o for timer/counter 2 p1.1 : t2ex timer/counter 2 capture/reload trigger p1.2 : rxd1 serial port 1 receive p1.3 : txd1 serial port 1 transmit p1.4 : int2 external interrupt 2 p1. 5 : int 3 external interrupt 3 p1.6 : int4 external interrupt 4 p1.7 : int 5 external interrupt 5 external interrupt flag bit: 7 6 5 4 3 2 1 0 ie5 ie4 ie3 ie2 xt/ rg rgmd rgsl 0 mnemonic: exif address: 91h ie5: external interrupt 5 flag. set by hardware when a falling edge is detected on int 5 . ie4: external interrupt 4 flag. set by hardware when a rising edge is detected on int4. ie3: external interrupt 3 flag. set by hard ware when a falling edge is detected on int 3 . ie2: external interrupt 2 flag. set by hardware when a rising edge is detected on int2. xt/ rg : crystal/rc oscillator select. setting this bit selects crystal or external clock as system clock source. clearing this bit selects the on - chip rc oscillator as clock source. xtup(status.4) must be set to 1 and xtoff (pmr.3) must be cleared before this bit can be set. attempts to set this bit without obeying these conditions will be ignored. this bit is set to 1 after a power - on reset and unchanged by other forms of reset. rgmd: rc mode status. this bit indicates the current clock source of microcontroller. when cleared, cpu is operating from the external crystal or oscillator. wh en set, cpu is operating from the on - chip rc oscillator. this bit is cleared to 0 after a power - on reset and unchanged by other forms of reset. rgsl: rc oscillator select. this bit selects the clock source following a resume from power down mode. setting t his bit allows device operating from rc oscillator when a resume from power down mode. when this bit is cleared, the device will hold operation until the crystal oscillator
p reliminary W77IE58 - 20 - has warmed - up following a resume from power down mode. this bit is cleared to 0 aft er a power - on reset and unchanged by other forms of reset.
p reliminary W77IE58 publication release date: july 2000 - 21 - revision a1 serial port control bit: 7 6 5 4 3 2 1 0 sm0/fe sm1 sm2 ren tb8 rb8 ti ri mnemonic: scon address: 98h sm0/fe: serial port 0, mode 0 bit or framing error flag: the smod0 bit in pcon sfr dete rmines whether this bit acts as sm0 or as fe. the operation of sm0 is described below. when used as fe, this bit will be set to indicate an invalid stop bit. this bit must be manually cleared in software to clear the fe condition. sm1: serial port mode bi t 1: sm0 sm1 mode description length baud rate 0 0 0 synchronous 8 4/12 tclk 0 1 1 asynchronous 10 variable 1 0 2 asynchronous 11 64/32 tclk 1 1 3 asynchronous 11 variable sm2: multiple processors communication. setting this bit to 1 enables the multiprocessor communication feature in mode 2 and 3. in mode 2 or 3, if sm2 is set to 1, then ri will not be activated if the received 9th data bit (rb8) is 0. in mode 1, if sm2 = 1, then ri will not be activated if a valid stop bit was not received. in mode 0, the sm2 bit controls the serial port clock. if set to 0, then the serial port runs at a divide by 12 clock of the oscillator. this gives compatibility with the standard 8052. when set to 1, the serial clock become divide by 4 of the oscillator clock. this results in faster synchronous serial communication. ren: receive enable: when set to 1 serial reception is enabled, otherwise reception is disabled. tb8: this is the 9th bit to be transmitted in modes 2 and 3. this bit is s et and cleared by software as desired. rb8: in modes 2 and 3 this is the received 9th data bit. in mode 1, if sm2 = 0, rb8 is the stop bit that was received. in mode 0 it has no function. ti: transmit interrupt flag: this flag is set by hardware at the end of the 8th bit time in mode 0, or at the beginning of the stop bit in all other modes during serial transmission. this bit must be cleared by software. ri: receive interrupt flag: this flag is set by hardware at the end of the 8th bit time in mode 0, or h alfway through the stop bits time in the other modes during serial reception. however the restrictions of sm2 apply to this bit. this bit can be cleared only by software.
p reliminary W77IE58 - 22 - serial data buffer bit: 7 6 5 4 3 2 1 0 sbuf.7 sbuf.6 sbuf.5 sbuf.4 sbuf.3 sbuf.2 sbuf.1 sbuf.0 mnemonic: sbuf address: 99h sbuf.7 - 0: serial data on the serial port 0 is read from or written to this location. it actually consists of two separate internal 8 - bit registers. one is the receive resister, and the other is the transmit bu ffer. any read access gets data from the receive data buffer, while write access is to the transmit data buffer. port 2 bit: 7 6 5 4 3 2 1 0 p2.7 p2.6 p2.5 p2.4 p2.3 p2.2 p2.1 p2.0 mnemonic: p2 address: a0h p2.7 - 0: port 2 is a bi - directional i/o po rt with internal pull - ups. this port also provides the upper address bits for accesses to external memory. port 4 bit: 7 6 5 4 3 2 1 0 - - - - p4.3 p4.2 p4.1 p4.0 mnemonic: p4 address: a5h p4.3 - 0: port 4 is a bi - directional i/o port with internal p ull - ups. interrupt enable bit: 7 6 5 4 3 2 1 0 ea es1 et2 es et1 ex1 et0 ex0 mnemonic: ie address: a8h ea: global enable. enable/disable all interrupts except for pfi. es1: enable serial port 1 interrupt. et2: enable timer 2 interrupt. es: enable serial port 0 interrupt. et1: enable timer 1 interrupt ex1: enable external interrupt 1 et0: enable timer 0 interrupt ex0: enable external interrupt 0
p reliminary W77IE58 publication release date: july 2000 - 23 - revision a1 slave address bit: 7 6 5 4 3 2 1 0 mnemonic: saddr address: a9h saddr: the saddr sh ould be programmed to the given or broadcast address for serial port 0 to which the slave processor is designated. slave address 1 bit: 7 6 5 4 3 2 1 0 mnemonic: saddr1 address: aah saddr1: the saddr1 should be programmed to the given or broadcast address for serial port 1 to which the slave processor is designated. port 3 bit: 7 6 5 4 3 2 1 0 p3.7 p3.6 p3.5 p3.4 p3.3 p3.2 p3.1 p3.0 mnemonic: p3 address: b0h p3.7 - 0: general purpose i/o port. each pin also has an alternate input or output function. the alternate functions are described below. p3.7 rd strobe for read from external ram p3.6 wr strobe for write to external ram p3.5 t1 timer/counter 1 external count input p3.4 t0 timer /counter 0 external count input p3.3 int 1 external interrupt 1 p3.2 int 0 external interrupt 0 p3.1 txd serial port 0 output p3.0 rxd serial port 0 input interrupt priority bit: 7 6 5 4 3 2 1 0 - ps1 pt2 ps p t1 px1 pt0 px0 mnemonic: ip address: b8h
p reliminary W77IE58 - 24 - ip.7: this bit is un - implemented and will read high. ps1: this bit defines the serial port 1 interrupt priority. ps = 1 sets it to higher priority level. pt2: this bit defines the timer 2 interrupt priority. pt2 = 1 sets it to higher priority level. ps: this bit defines the serial port 0 interrupt priority. ps = 1 sets it to higher priority level. pt1: this bit defines the timer 1 interrupt priority. pt1 = 1 sets it to higher priority level. px1: this bit defi nes the external interrupt 1 priority. px1 = 1 sets it to higher priority level. pt0: this bit defines the timer 0 interrupt priority. pt0 = 1 sets it to higher priority level. px0: this bit defines the external interrupt 0 priority. px0 = 1 sets it to hig her priority level. slave address mask enable bit: 7 6 5 4 3 2 1 0 mnemonic: saden address: b9h saden: this register enables the automatic address recognition feature of the serial port 0. when a bit in the saden is set to 1, the sa me bit location in saddr will be compared with the incoming serial data. when saden.n is 0, then the bit becomes a "don't care" in the comparison. this register enables the automatic address recognition feature of the serial port 0. when all the bits of sa den are 0, interrupt will occur for any incoming address. slave address mask enable 1 bit: 7 6 5 4 3 2 1 0 mnemonic: saden1 address: bah saden1:this register enables the automatic address recognition feature of the serial port 1. wh en a bit in the saden1 is set to 1, the same bit location in saddr1 will be compared with the incoming serial data. when saden1.n is 0, then the bit becomes a "don't care" in the comparison. this register enables the automatic address recognition feature o f the serial port 1. when all the bits of saden1 are 0, interrupt will occur for any incoming address. serial port control 1 bit: 7 6 5 4 3 2 1 0 sm0_1/fe_1 sm1_1 sm2_1 ren_1 tb8_1 rb8_1 ti_1 ri_1 mnemonic: scon1 address: c0h sm0_1/fe_1: serial port 1, mode 0 bit or framing error flag 1: the smod0 bit in pcon sfr determines whether this bit acts as sm0_1 or as fe_1. the operation of sm0_1 is described below. when used as fe_1, this bit will be set to indicate an invalid stop bit. this bit must be man ually cleared in software to clear the fe_1 condition.
p reliminary W77IE58 publication release date: july 2000 - 25 - revision a1 sm1_1: serial port 1 mode bit 1: sm0_1 sm1_1 mode description length baud rate 0 0 0 synchronous 8 4/12 tclk 0 1 1 asynchronous 10 variable 1 0 2 asynchronous 11 64/32 tclk 1 1 3 asynchronous 11 variable sm2_1: multiple processors communication. setting this bit to 1 enables the multiprocessor communication feature in mode 2 and 3. in mode 2 or 3, if sm2_1 is set to 1, then ri_1 will not be activated if the received 9th data bit (rb8_1) is 0. in mode 1, if sm2_1 = 1, then ri_1 will not be activated if a valid stop bit was not received. in mode 0, the sm2_1 bit controls the serial port 1 clock. if set to 0, then the serial port 1 runs at a divide by 12 clock of the oscillator. thi s gives compatibility with the standard 8052. when set to 1, the serial clock become divide by 4 of the oscillator clock. this results in faster synchronous serial communication. ren_1: receive enable: when set to 1 serial reception is enabled, otherwise r eception is disabled. tb8_1: this is the 9th bit to be transmitted in modes 2 and 3. this bit is set and cleared by software as desired. rb8_1: in modes 2 and 3 this is the received 9th data bit. in mode 1, if sm2_1 = 0, rb8_1 is the stop bit that was rece ived. in mode 0 it has no function. ti_1: transmit interrupt flag: this flag is set by hardware at the end of the 8th bit time in mode 0, or at the beginning of the stop bit in all other modes during serial transmission. this bit must be cleared by softwar e. ri_1: receive interrupt flag: this flag is set by hardware at the end of the 8th bit time in mode 0, or halfway through the stop bits time in the other modes during serial reception. however the restrictions of sm2_1 apply to this bit. this bit can be c leared only by software. serial data buffer 1 bit: 7 6 5 4 3 2 1 0 sbuf1.7 sbuf1.6 sbuf1.5 sbuf1.4 sbuf1.3 sbuf1.2 sbuf1.1 sbuf1.0 mnemonic: sbuf1 address: c1h sbuf1.7 - 0: serial data of the serial port 1 is read from or written to this location. it actually consists of two separate 8 - bit registers. one is the receive resister, and the other is the transmit buffer. any read access gets data from the receive data buffer, while write accesses are to the transmit data buffer. rommap bit: 7 6 5 4 3 2 1 0 ws 1 - - - - - - mnemonic: rommap address: c2h
p reliminary W77IE58 - 26 - ws: wait state signal enable. setting this bit enables the wait signal on p4.0. the device will sample the wait state control signal wait via p4.0 during movx instruction. this bit is time access protected. power management register bit: 7 6 5 4 3 2 1 0 cd1 cd0 swb - xtoff ale - off - dme0 mnemonic: pmr address: c4h cd1,cd0: clock divide control. these bit selects the number of clocks required to generate one machine cycle. there are three modes including divide by 4, 64 or 1024. switching between modes must first go back devide by 4 mode. for instance, to go from 64 to 1024 clocks/machine cycle the device must first go from 64 to 4 clocks/machine cycle, an d then from 4 to 1024 clocks/machine cycle. cd1, cd0 clocks/machine cycle 0 0 reserved 0 1 4 1 0 64 1 1 1024 swb: switchback enable. setting this bit allows an enabled external interrupt or serial port activity to force the cd1,cd0 to divide by 4 sta te (0,1). the device will switch modes at the start of the jump to interrupt service routine while a external interrupt is enabled and actually recongnized by microcontroller. while a serial port reception, the switchback occurs at the start of the instruc tion following the falling edge of the start bit. xtoff: crystal oscillator disable. setting this bit disables the external crystal oscillator. this bit can only be set to 1 while the microcontroller is operating from the rc oscillator. clearing this bit r estarts the crystal oscillator, the xtup (status.4) bit will be set after crystal oscillator warmed - up has completed. ale0ff: this bit disables the expression of the ale signal on the device pin during all on - board program and data memory accesses. externa l memory accesses will automatically enable ale independent of aleoff. 0 = ale expression is enable; 1 = ale expression is disable dme0: this bit determines the on - chip movx sram to be enabled or disabled. set this bit to 1 will enable the on - chip 1kb movx sram.
p reliminary W77IE58 publication release date: july 2000 - 27 - revision a1 status register bit: 7 6 5 4 3 2 1 0 - hip lip xtup spta1 spra1 spta0 spra0 mnemonic: status address: c5h hip: high priority interrupt status. when set, it indicates that software is servicing a high priority interrupt. this bit will be cleared when the program executes the corresponding reti instruction. lip: low priority interrupt status. when set, it indicates that software is servicing a low priority interrupt. this bit will be cleared when the program executes the corresponding ret i instruction. xtup:crystal oscillator warm - up status. when set, this bit indicates cpu has detected clock to be ready. each time the crystal oscillator is restarted by exit from power down mode or the xtoff bit is set, hardware will clear this bit. this b it is set to 1 after a power - on reset. when this bit is cleared, it prevents software from setting the xt/ rg bit to enable cpu operation from crystal oscillator. spta1:serial port 1 transmit activity. this bit is set during serial port 1 is currently transmitting data. it is cleared when ti_1 bit is set by hardware. changing the clock divide control bits cd0,cd1 will be ignored when this bit is set to 1 and swb = 1. spra1:serial port 1 receive activity. this bit is set during serial po rt 1 is currently receiving a data. it is cleared when ri_1 bit is set by hardware. changing the clock divide control bits cd0,cd1 will be ignored when this bit is set to 1 and swb = 1. spta0:serial port 0 transmit activity. this bit is set during serial p ort 0 is currently transmitting data. it is cleared when ti bit is set by hardware. changing the clock divide control bits cd0,cd1 will be ignored when this bit is set to 1 and swb = 1. spra0:serial port 0 receive activity. this bit is set during serial p ort 0 is currently receiving a data. it is cleared when ri bit is set by hardware. changing the clock divide control bits cd0,cd1 will be ignored when this bit is set to 1 and swb = 1. timed access bit: 7 6 5 4 3 2 1 0 ta.7 ta.6 ta.5 ta.4 ta.3 ta.2 ta.1 ta.0 mnemonic: ta address: c7h ta: the timed access register controls the access to protected bits. to access protected bits, the user must first write aah to the ta. this must be immediately followed by a write of 55h to ta. now a window is opened i n the protected bits for three machine cycles, during which the user can write to these bits.
p reliminary W77IE58 - 28 - timer 2 control bit: 7 6 5 4 3 2 1 0 tf2 exf2 rclk tclk exen2 tr2 c t / 2 cp rl / 2 mnemonic: t2con address: c8h tf2: timer 2 overflow flag: this bit is set when timer 2 overflows. it is also set when the count is equal to the capture register in down count mode. it can be set only if rclk and tclk are both 0. it is cleared only by software. software can also set or clear this bit. exf2: timer 2 external flag: a negative transition on the t2ex pin (p1.1) or timer 2 overflow will cause this flag to set based on the cp rl / 2 , exen2 and dcen bits. if set by a negative transition, this flag must be cleared by software . setting this bit in software or detection of a negative transition on t2ex pin will force a timer interrupt if enabled. rclk: receive clock flag: this bit determines the serial port 0 time - base when receiving data in serial modes 1 or 3. if it is 0, then timer 1 overflow is used for baud rate generation, otherwise timer 2 overflow is used. setting this bit forces timer 2 in baud rate generator mode. tclk: transmit clock flag: this bit determines the serial port 0 time - base when transmitting data in modes 1 and 3. if it is set to 0, the timer 1 overflow is used to generate the baud rate clock otherwise timer 2 overflow is used. setting this bit forces timer 2 in baud rate generator mode. exen2: timer 2 external enable. this bit enables the capture/reload fu nction on the t2ex pin if timer 2 is not generating baud clocks for the serial port. if this bit is 0, then the t2ex pin will be ignored, otherwise a negative transition detected on the t2ex pin will result in capture or reload. tr2: timer 2 run control. this bit enables/disables the operation of timer 2. clearing this bit will halt the timer 2 and preserve the current count in th2, tl2. c t / 2 : counter/timer select. this bit determines whether timer 2 will function as a timer or a counter . independent of this bit, the timer will run at 2 clocks per tick when used in baud rate generator mode. if it is set to 0, then timer 2 operates as a timer at a speed depending on t2m bit (ckcon.5), otherwise it will count negative edges on t2 pin. cp rl / 2 :capture/reload select. this bit determines whether the capture or reload function will be used for timer 2. if either rclk or tclk is set, this bit will be ignored and the timer will function in an auto - reload mode following each overflo w. if the bit is 0 then auto - reload will occur when timer 2 overflows or a falling edge is detected on t2ex pin if exen2 = 1. if this bit is 1, then timer 2 captures will occur when a falling edge is detected on t2ex pin if exen2 = 1. timer 2 mode control bit: 7 6 5 4 3 2 1 0 hc5 hc4 hc3 hc2 t2cr - t2oe dcen mnemonic: t2mod address: c9h
p reliminary W77IE58 publication release date: july 2000 - 29 - revision a1 hc5: hardware clear int 5 flag. setting this bit allows the flag of external interrupt 5 to be automatically cleared by hardware while entering th e interrupt service routine. hc4: hardware clear int4 flag. setting this bit allows the flag of external interrupt 4 to be automatically cleared by hardware while entering the interrupt service routine. hc3: hardware clear int 3 flag. set ting this bit allows the flag of external interrupt 3 to be automatically cleared by hardware while entering the interrupt service routine. hc3: hardware clear int2 flag. setting this bit allows the flag of external interrupt 3 to be automatically cleared by hardware while entering the interrupt service routine. t2cr: timer 2 capture reset. in the timer 2 capture mode this bit enables/disables hardware automatically reset timer 2 while the value in tl2 and th2 have been transferred into the capture register . t2oe: timer 2 output enable. this bit enables/disables the timer 2 clock out function. dcen: down count enable: this bit, in conjunction with the t2ex pin, controls the direction that timer 2 counts in 16 - bit auto - reload mode. timer 2 capture lsb bit: 7 6 5 4 3 2 1 0 rcap2l.7 rcap2l.6 rcap2l.5 rcap2l.4 rcap2l.3 rcap2l.2 rcap2l.1 rcap2l.0 mnemonic: rcap2l address: cah rcap2l:this register is used to capture the tl2 value when a timer 2 is configured in capture mode. rcap2l is also used as the lsb o f a 16 - bit reload value when timer 2 is configured in auto - reload mode. timer 2 capture msb bit: 7 6 5 4 3 2 1 0 rcap2h.7 rcap2h.6 rcap2h.5 rcap2h.4 rcap2h.3 rcap2h.2 rcap2h.1 rcap2h.0 mnemonic: rcap2h address: cbh rcap2h:this register is used to c apture the th2 value when a timer 2 is configured in capture mode. rcap2h is also used as the msb of a 16 - bit reload value when timer 2 is configured in auto - reload mode. timer 2 lsb bit: 7 6 5 4 3 2 1 0 tl2.7 tl2.6 tl2.5 tl2.4 tl2.3 tl2.2 tl2.1 tl2.0 m nemonic: tl2 address: cch tl2: timer 2 lsb
p reliminary W77IE58 - 30 - timer2 msb bit: 7 6 5 4 3 2 1 0 th2.7 th2.6 th2.5 th2.4 th2.3 th2.2 th2.1 th2.0 mnemonic: th2 address: cdh th2: timer 2 msb program status word bit: 7 6 5 4 3 2 1 0 cy ac f0 rs1 rs0 ov f1 p mnemon ic: psw address: d0h cy: carry flag: set for an arithmetic operation which results in a carry being generated from the alu. it is also used as the accumulator for the bit operations. ac: auxiliary carry: set when the previous operation resulted in a ca rry from the high order nibble. f0: user flag 0: general purpose flag that can be set or cleared by the user. rs.1 - 0: register bank select bits: rs1 rs0 register bank address 0 0 0 00 - 07h 0 1 1 08 - 0fh 1 0 2 10 - 17h 1 1 3 18 - 1fh ov: overflow flag: set when a carry was generated from the seventh bit but not from the 8th bit as a result of the previous operation, or vice - versa. f1: user flag 1: general purpose flag that can be set or cleared by the user by software. p: parity flag: set/cleared by hardware to indicate odd/even number of 1's in the accumulator. watchdog control bit: 7 6 5 4 3 2 1 0 smod_1 por - - wdif wtrf ewt rwt mnemonic: wdcon address: d8h smod_1:this bit doubles the serial port 1 baud rate in mode 1, 2, and 3 when set to 1. por: power - on reset flag. hardware will set this flag on a power up condition. this flag can be read or written by software. a write by software is the only way to clear this bit once it is set. wdif: watchdog timer interrupt flag. if the watchdog interrupt is enabled, hardware will set this bit to indicate that the watchdog interrupt has occurred. if the interrupt is not enabled, then this bit indicates that the time - out period has elapsed. this bit must be cleared by software.
p reliminary W77IE58 publication release date: july 2000 - 31 - revision a1 wtrf: watc hdog timer reset flag. hardware will set this bit when the watchdog timer causes a reset. software can read it but must clear it manually. a power - fail reset will also clear the bit. this bit helps software in determining the cause of a reset. if ewt = 0, the watchdog timer will have no affect on this bit. ewt: enable watchdog timer reset. setting this bit will enable the watchdog timer reset function. rwt: reset watchdog timer. this bit helps in putting the watchdog timer into a know state. it also helps in resetting the watchdog timer before a time - out occurs. failing to set the ewt before time - out will cause an interrupt, if ewdi (eie.4) is set, and 512 clocks after that a watchdog timer reset will be generated if ewt is set. this bit is self - clearing b y hardware. the wdcon sfr is set to a 0x0x0xx0b on an external reset. wtrf is set to a 1 on a watchdog timer reset, but to a 0 on power on/down resets. wtrf is not altered by an external reset. por is set to 1 by a power - on reset. ewt is set to 0 on a powe r - on reset and unaffected by other resets. all the bits in this sfr have unrestricted read access. por, ewt, wdif and rwt require timed access procedure to write. the remaining bits have unrestricted write accesses. accumulator bit: 7 6 5 4 3 2 1 0 acc.7 acc.6 acc.5 acc.4 acc.3 acc.2 acc.1 acc.0 mnemonic: acc address: e0h acc.7 - 0: the a (or acc) register is the standard 8052 accumulator. extended interrupt enable bit: 7 6 5 4 3 2 1 0 - - - ewdi ex5 ex4 ex3 ex2 mnemonic: eie address: e8h ei e.7 - 5:reserved bits, will read high ewdi: enable watchdog timer interrupt ex5: external interrupt 5 enable. ex4: external interrupt 4 enable. ex3: external interrupt 3 enable. ex2: external interrupt 2 enable.
p reliminary W77IE58 - 32 - b register bit: 7 6 5 4 3 2 1 0 b.7 b.6 b.5 b.4 b.3 b.2 b.1 b.0 mnemonic: b address: f0h b.7 - 0: the b register is the standard 8052 register that serves as a second accumulator. exterded interrupt priority bit: 7 6 5 4 3 2 1 0 - - - pwdi px5 px4 px3 px2 mnemonic: eip address: f8h eip.7 - 5: reserved bits. pwdi: watchdog timer interrupt priority. px5: external interrupt 5 priority. 0 = low priority, 1 = high priority. px4: external interrupt 4 priority. 0 = low priority, 1 = high priority. px3: external interrupt 3 priority. 0 = low priority, 1 = high priority. px2: external interrupt 2 priority. 0 = low priority, 1 = high priority. instruction the W77IE58 executes all the instructions of the standard 8032 family. the operation of these instructions, their effect on the flag bits and the status bits is exactly the same. however, timing of these instructions is different. the reason for this is two fold. firstly, in the W77IE58, each machine cycle consists of 4 clock periods, while in the standard 8032 it consists of 12 clock periods. a lso, in the W77IE58 there is only one fetch per machine cycle i.e. 4 clocks per fetch, while in the standard 8032 there can be two fetches per machine cycle, which works out to 6 clocks per fetch. the advantage the W77IE58 has is that since there is only o ne fetch per machine cycle, the number of machine cycles in most cases is equal to the number of operands that the instruction has. in case of jumps and calls there will be an additional cycle that will be needed to calculate the new address. but overall t he W77IE58 reduces the number of dummy fetches and wasted cycles, thereby improving efficiency as compared to the standard 8032.
p reliminary W77IE58 publication release date: july 2000 - 33 - revision a1 table 2. instructions that affect flag settings instruction carry overflow auxiliary carry instruction carry overflow auxilia ry carry add x x x clr c 0 addc x x x cpl c x subb x x x anl c, bit x mul 0 x anl c, bit x div 0 x orl c, bit x da a x orl c, bit x rrc a x mov c, bit x rlc a x cjne x setb c 1 a "x" indicates that the modification i s as per the result of instruction. table 3. instruction timing for W77IE58 instruction hex op - code bytes W77IE58 machine cycles W77IE58 clock cycles 8032 clock cycles W77IE58 vs. 8032 speed ratio nop 00 1 1 4 12 3 add a, r0 28 1 1 4 12 3 add a, r1 29 1 1 4 12 3 add a, r2 2a 1 1 4 12 3 add a, r3 2b 1 1 4 12 3 add a, r4 2c 1 1 4 12 3 add a, r5 2d 1 1 4 12 3 add a, r6 2e 1 1 4 12 3 add a, r7 2f 1 1 4 12 3 add a, @r0 26 1 1 4 12 3 add a, @r1 27 1 1 4 12 3 add a, direct 25 2 2 8 12 1.5 add a, #da ta 24 2 2 8 12 1.5 addc a, r0 38 1 1 4 12 3 addc a, r1 39 1 1 4 12 3 addc a, r2 3a 1 1 4 12 3 addc a, r3 3b 1 1 4 12 3 addc a, r4 3c 1 1 4 12 3 addc a, r5 3d 1 1 4 12 3 addc a, r6 3e 1 1 4 12 3 addc a, r7 3f 1 1 4 12 3
p reliminary W77IE58 - 34 - table 3. instruction timing for W77IE58, continued instruction hex op - code bytes W77IE58 machine cycles W77IE58 clock cycles 8032 clock cycles W77IE58 vs. 8032 speed ratio addc a, @r0 36 1 1 4 12 3 addc a, @r1 37 1 1 4 12 3 addc a, direct 35 2 2 8 12 1.5 addc a, #data 34 2 2 8 12 1.5 acall addr11 71, 91, b1, 11, 31, 51, d1, f1 2 3 12 24 2 ajmp addr11 01, 21, 41, 61, 81, a1, c1, e1 2 3 12 24 2 anl a, r0 58 1 1 4 12 3 anl a, r1 59 1 1 4 12 3 anl a, r2 5a 1 1 4 12 3 anl a, r3 5b 1 1 4 12 3 anl a, r4 5c 1 1 4 12 3 anl a, r5 5d 1 1 4 12 3 anl a, r6 5e 1 1 4 12 3 anl a, r7 5f 1 1 4 12 3 anl a, @r0 56 1 1 4 12 3 anl a, @r1 57 1 1 4 12 3 anl a, direct 55 2 2 8 12 1.5 anl a, #data 54 2 2 8 12 1.5 anl direct, a 52 2 2 8 12 1.5 anl direct, #data 53 3 3 12 24 2 anl c, bit 8 2 2 2 8 24 3 anl c, /bit b0 2 2 8 24 3 cjne a, direct, rel b5 3 4 16 24 1.5 cjne a, #data, rel b4 3 4 16 24 1.5 cjne @r0, #data, rel b6 3 4 16 24 1.5 cjne @r1, #data, rel b7 3 4 16 24 1.5 cjne r0, #data, rel b8 3 4 16 24 1.5 cjne r1, #data, rel b9 3 4 16 24 1.5 cjne r2, #data, rel ba 3 4 16 24 1.5 cjne r3, #data, rel bb 3 4 16 24 1.5 cjne r4, #data, rel bc 3 4 16 24 1.5 cjne r5, #data, rel bd 3 4 16 24 1.5 cjne r6, #data, rel be 3 4 16 24 1.5
p reliminary W77IE58 publication release date: july 2000 - 35 - revision a1 table 3. instruction timing for W77IE58, continued instruction hex op - code bytes W77IE58 machine cycles W77IE58 clock cycles 8032 clock cycles W77IE58 vs. 8032 speed ratio clr a e4 1 1 4 12 3 cpl a f4 1 1 4 12 3 clr c c3 1 1 4 12 3 clr bit c2 2 2 8 12 1.5 cpl c b3 1 1 4 12 3 cpl bit b2 2 2 8 12 1.5 dec a 14 1 1 4 12 3 dec r0 18 1 1 4 12 3 dec r1 19 1 1 4 12 3 dec r2 1a 1 1 4 12 3 dec r3 1b 1 1 4 12 3 dec r4 1c 1 1 4 12 3 dec r5 1d 1 1 4 12 3 dec r6 1e 1 1 4 12 3 dec r7 1f 1 1 4 12 3 dec @r0 16 1 1 4 12 3 dec @r1 17 1 1 4 12 3 dec direct 15 2 2 8 12 1.5 dec dptr a5 1 2 8 - - div ab 84 1 5 20 48 2.4 da a d4 1 1 4 12 3 djnz r0, rel d8 2 3 12 24 2 djnz r1, rel d9 2 3 12 24 2 djnz r5, rel dd 2 3 12 24 2 djnz r2, rel da 2 3 12 24 2 djnz r3, rel db 2 3 12 24 2 djnz r4, rel dc 2 3 12 24 2 djnz r6, rel de 2 3 12 24 2 djnz r7, rel df 2 3 12 24 2 djnz direct, rel d5 3 4 16 24 1.5 inc a 04 1 1 4 12 3 inc r0 08 1 1 4 12 3 inc r1 09 1 1 4 12 3 inc r2 0a 1 1 4 12 3 inc r3 0b 1 1 4 12 3 inc r4 0c 1 1 4 12 3
p reliminary W77IE58 - 36 - table 3. instruction timing for W77IE58, continued instruction hex op - code bytes W77IE58 machine cycles W77IE58 clock cycles 8032 clock cycles W77IE58 vs. 8032 speed ratio inc r6 0e 1 1 4 12 3 inc r7 0f 1 1 4 12 3 inc @r0 06 1 1 4 12 3 inc @r1 07 1 1 4 12 3 inc direct 05 2 2 8 12 1.5 inc dptr a3 1 2 8 24 3 jmp @a+dptr 73 1 2 8 24 3 jz rel 60 2 3 12 24 2 jnz rel 70 2 3 12 24 2 jc rel 40 2 3 12 24 2 jnc rel 50 2 3 12 24 2 jb bit, rel 20 3 4 16 24 1.5 jnb bit, rel 30 3 4 16 24 1.5 jbc bit, rel 10 3 4 16 24 1.5 lcall addr 16 12 3 4 16 24 1.5 ljmp addr16 02 3 4 16 24 1.5 mul ab a4 1 5 20 48 2.4 mov a, r0 e8 1 1 4 12 3 mov a, r1 e9 1 1 4 12 3 mov a, r2 ea 1 1 4 12 3 mov a, r3 eb 1 1 4 12 3 mov a, r4 ec 1 1 4 12 3 mov a, r5 ed 1 1 4 12 3 mov a, r6 ee 1 1 4 12 3 mov a , r7 ef 1 1 4 12 3 mov a, @r0 e6 1 1 4 12 3 mov a, @r1 e7 1 1 4 12 3 mov a, direct e5 2 2 8 12 1.5 mov a, #data 74 2 2 8 12 1.5 mov r0, a f8 1 1 4 12 3 mov r1, a f9 1 1 4 12 3 mov r2, a fa 1 1 4 12 3 mov r3, a fb 1 1 4 12 3 mov r4, a fc 1 1 4 12 3 mov r5, a fd 1 1 4 12 3 mov r6, a fe 1 1 4 12 3 mov r7, a ff 1 1 4 12 3
p reliminary W77IE58 publication release date: july 2000 - 37 - revision a1 table 3. instruction timing for W77IE58, continued instruction hex op - code bytes W77IE58 machine cycles W77IE58 clock cycles 8032 clock cycles W77IE58 vs. 8032 speed ratio mo v r1, direct a9 2 2 8 12 1.5 mov r2, direct aa 2 2 8 12 1.5 mov r3, direct ab 2 2 8 12 1.5 mov r4, direct ac 2 2 8 12 1.5 mov r5, direct ad 2 2 8 12 1.5 mov r6, direct ae 2 2 8 12 1.5 mov r7, direct af 2 2 8 12 1.5 mov r0, #data 78 2 2 8 12 1.5 mov r1, #data 79 2 2 8 12 1.5 mov r2, #data 7a 2 2 8 12 1.5 mov r3, #data 7b 2 2 8 12 1.5 mov r4, #data 7c 2 2 8 12 1.5 mov r5, #data 7d 2 2 8 12 1.5 mov r6, #data 7e 2 2 8 12 1.5 mov r7, #data 7f 2 2 8 12 1.5 mov @r0, a f6 1 1 4 12 3 mov @r1, a f7 1 1 4 12 3 mov @r0, direct a6 2 2 8 12 1.5 mov @r1, direct a7 2 2 8 12 1.5 mov @r0, #data 76 2 2 8 12 1.5 mov @r1, #data 77 2 2 8 12 1.5 mov direct, a f5 2 2 8 12 1.5 mov direct, r0 88 2 2 8 12 1.5 mov direct, r1 89 2 2 8 12 1.5 mov direct, r2 8a 2 2 8 12 1.5 mov direct, r3 8b 2 2 8 12 1.5 mov direct, r4 8c 2 2 8 12 1.5 mov direct, r5 8d 2 2 8 12 1.5 mov direct, r6 8e 2 2 8 12 1.5 mov direct, r7 8f 2 2 8 12 1.5 mov direct, @r0 86 2 2 8 12 1.5 mov direct, @r1 87 2 2 8 12 1.5 mov direct, direct 85 3 3 12 24 2 mov direct, #data 75 3 3 12 24 2 mov dptr, #data 16 90 3 3 12 24 2 movc a, @a+dptr 93 1 2 8 24 3
p reliminary W77IE58 - 38 - table 3. instruction timing for W77IE58, continued instruction hex op - code bytes W77IE58 machine cycles W77IE58 clock cycles 8032 clock cy cles W77IE58 vs. 8032 speed ratio movx a, @r0 e2 1 2 - 9 8 - 36 24 3 - 0.66 movx a, @r1 e3 1 2 - 9 8 - 36 24 3 - 0.66 movx a, @dptr e0 1 2 - 9 8 - 36 24 3 - 0.66 movx @r0, a f2 1 2 - 9 8 - 36 24 3 - 0.66 movx @r1, a f3 1 2 - 9 8 - 36 24 3 - 0.66 mov x @dptr, a f0 1 2 - 9 8 - 36 24 3 - 0.66 mov c, bit a2 2 2 8 12 1.5 mov bit, c 92 2 2 8 24 3 orl a, r0 48 1 1 4 12 3 orl a, r1 49 1 1 4 12 3 orl a, r2 4a 1 1 4 12 3 orl a, r3 4b 1 1 4 12 3 orl a, r4 4c 1 1 4 12 3 orl a, r5 4d 1 1 4 12 3 orl a, r6 4e 1 1 4 12 3 orl a, r7 4f 1 1 4 12 3 orl a, @r0 46 1 1 4 12 3 orl a, @r1 47 1 1 4 12 3 orl a, direct 45 2 2 8 12 1.5 orl a, #data 44 2 2 8 12 1.5 orl direct, a 42 2 2 8 12 1.5 orl direct, #data 43 3 3 12 24 2 orl c, bit 72 2 2 8 24 3 orl c, /bit a0 2 2 6 24 3 push direct c0 2 2 8 24 3 pop direct d0 2 2 8 24 3 ret 22 1 2 8 24 3 reti 32 1 2 8 24 3 rl a 23 1 1 4 12 3 rlc a 33 1 1 4 12 3 rr a 03 1 1 4 12 3 rrc a 13 1 1 4 12 3 setb c d3 1 1 4 12 3 setb bit d2 2 2 8 12 1.5 swap a c4 1 1 4 12 3 sjmp rel 80 2 3 12 24 2 subb a, r0 98 1 1 4 12 3
p reliminary W77IE58 publication release date: july 2000 - 39 - revision a1 table 3. instruction timing for W77IE58, continued instruction hex op - code bytes W77IE58 machine cycles W77IE58 clock cycles 8032 clock cycles W77IE58 vs. 8032 speed ratio subb a, r2 9a 1 1 4 12 3 subb a, r3 9b 1 1 4 12 3 subb a, r4 9c 1 1 4 12 3 subb a, r5 9d 1 1 4 12 3 subb a, r6 9e 1 1 4 12 3 subb a, r7 9f 1 1 4 12 3 subb a, @r0 96 1 1 4 12 3 subb a, @r1 97 1 1 4 12 3 subb a, direct 95 2 2 8 12 1.5 subb a, #data 94 2 2 8 12 1.5 xch a, r0 c8 1 1 4 12 3 xch a, r1 c9 1 1 4 12 3 xch a, r2 ca 1 1 4 12 3 xch a, r3 cb 1 1 4 12 3 xch a, r4 cc 1 1 4 12 3 xch a, r5 cd 1 1 4 12 3 xch a, r6 ce 1 1 4 12 3 xch a, r7 cf 1 1 4 12 3 xch a, @r0 c6 1 1 4 12 3 xch a, @r1 c7 1 1 4 12 3 xchd a, @r0 d 6 1 1 4 12 3 xchd a, @r1 d7 1 1 4 12 3 xch a, direct c5 2 2 8 12 1.5 xrl a, r0 68 1 1 4 12 3 xrl a, r1 69 1 1 4 12 3 xrl a, r2 6a 1 1 4 12 3 xrl a, r3 6b 1 1 4 12 3 xrl a, r4 6c 1 1 4 12 3 xrl a, r5 6d 1 1 4 12 3 xrl a, r6 6e 1 1 4 12 3 xrl a, r7 6f 1 1 4 12 3 xrl a, @r0 66 1 1 4 12 3 xrl a, @r1 67 1 1 4 12 3 xrl a, direct 65 2 2 8 12 1.5 xrl a, #data 64 2 2 8 12 1.5 xrl direct, a 62 2 2 8 12 1.5
p reliminary W77IE58 - 40 - xrl direct, #data 63 3 3 12 24 2
p reliminary W77IE58 publication release date: july 2000 - 41 - revision a1 instructiion timing the instruction timing for the W77IE58 is an important aspect, especially for those users who wish to use software instructions to generate timing delays. also, it provides the user with an insight into the timing differences between the W77IE58 and the standard 8032. in the W77IE58 each machine cycle is four clock periods long. each clock period is designated a state. thus each machine cycle is made up of four states, c1, c2 c3 and c4, in that order. due to the reduced time for each instruction execution, both the clock edges are used for intern al timing. hence it is important that the duty cycle of the clock be as close to 50% as possible to avoid timing conflicts. as mentioned earlier, the W77IE58 does one op - code fetch per machine cycle. therefore, in most of the instructions, the number of ma chine cycles needed to execute the instruction is equal to the number of bytes in the instruction. of the 256 available op - codes, 128 of them are single cycle instructions. thus more than half of all op - codes in the W77IE58 are executed in just four clock periods. most of the two - cycle instructions are those that have two byte instruction codes. however there are some instructions that have only one byte instructions, yet they are two cycle instructions. one instruction which is of importance is the movx in struction. in the standard 8032, the movx instruction is always two machine cycles long. however in the W77IE58, the user has a facility to stretch the duration of this instruction from 2 machine cycles to 9 machine cycles. the rd and wr strobe lines are also proportionately elongated. this gives the user flexibility in accessing both fast and slow peripherals without the use of external circuitry and with minimum software overhead. the rest of the instructions are either three, four or five machine cycle instructions. note that in the W77IE58, based on the number of machine cycles, there are five different types, while in the standard 8032 there are only three. however, in the W77IE58 each machine cycle is made of o nly 4 clock periods compared to the 12 clock periods for the standard 8032. therefore, even though the number of categories has increased, each instruction is at least 1.5 to 3 times faster than the standard 8032 in terms of clock periods. single cycle c4 c3 c2 c1 clk ale psen ad7-0 port 2 a7-0 address a15-8 data_ in d7-0 figure 3. single cycle instruction timing
p reliminary W77IE58 - 42 - instruction fetch c4 c3 c2 c1 op-code address a15-8 address a15-8 ale psen pc ad7-0 port 2 clk operand fetch c4 c3 c2 c1 operand pc+1 figure 4. two cycle instruction timing operand operand a7-0 a7-0 a7-0 op-code address a15-8 address a15-8 address a15-8 operand fetch operand fetch instruction fetch c2 c3 c4 c2 c3 c4 c4 c3 c2 c1 c1 c1 clk ale psen ad7-0 port 2 figure 5. three cycle instruction timing
p reliminary W77IE58 publication release date: july 2000 - 43 - revision a1 operand operand operand op-code address a15-8 address a15-8 address a15-8 address a15-8 a7-0 a7-0 a7-0 a7-0 operand fetch operand fetch operand fetch instruction fetch c2 c1 c4 c3 c2 c1 clk ale psen ad7-0 port 2 c4 c3 c2 c1 c4 c3 c2 c1 c4 c3 figure 6. four cycle instruction timing operand operand operand op-code address a15-8 address a15-8 address a15-8 address a15-8 a7-0 a7-0 a7-0 a7-0 operand fetch operand fetch operand fetch operand fetch instruction fetch c2 c1 c4 c3 c2 c1 clk ale psen ad7-0 port 2 c4 c3 c2 c1 c4 c3 c2 c1 c4 c3 c2 c1 c4 c3 operand a7-0 address a15-8 f igure 7. five cycle instruction timing
p reliminary W77IE58 - 44 - movx instruction the W77IE58, like the standard 8032, uses the movx instruction to access external data memory. this data memory includes both off - chip memory as well as memory mapped peripherals. while the results o f the movx instruction are the same as in the standard 8032, the operation and the timing of the strobe signals have been modified in order to give the user much greater flexibility. the movx instruction is of two types, the movx @ri and movx @dptr. in the movx @ri, the address of the external data comes from two sources. the lower 8 - bits of the address are stored in the ri register of the selected working register bank. the upper 8 - bits of the address come from the port 2 sfr. in the movx @dptr type, the f ull 16 - bit address is supplied by the data pointer. since the W77IE58 has two data pointers, dptr and dptr1, the user has to select between the two by setting or clearing the dps bit. the data pointer select bit (dps) is the lsb of the dps sfr, which exist s at location 86h. no other bits in this sfr have any effect, and they are set to 0. when dps is 0, then dptr is selected, and when set to 1, dptr1 is selected. the user can switch between dptr and dptr1 by toggling the dps bit. the quickest way to do this is by the inc instruction. the advantage of having two data pointers is most obvious while performing block move operations. the accompanying code shows how the use of two separate data pointers speeds up the execution time for code performing the same ta sk. block move with single data pointer: ; sh and sl are the high and low bytes of source address ; dh and dl are the high and low bytes of destination address ; cnt is the number of bytes to be moved machine cycles of W77IE58 # mov r 2, #cnt ; load r2 with the count value 2 mov r3, #sl ; save low byte of source address in r3 2 mov r4, #sh ; save high byte of source address in r4 2 mov r5, #dl ; save low byte of destination address in r5 2 mov r6, #dh ; save high byte of des tination address in r6 2 loop: mov dpl, r3 ; load dpl with low byte of source address 2 mov dph, r4 ; load dph with high byte of source address 2 movx a, @dptr ; get byte from source to accumulator 2 inc dptr ; increment source address to next by te 2 mov r3, dpl ; save low byte of source address in r3 2 mov r4, dph ; save high byte of source address in r4 2 mov dpl, r5 ; load low byte of destination address in dpl 2 mov dph, r6 ; load high byte of destination address in dph 2 movx @dpt r, a ; write data to destination 2 inc dptr ; increment destination address 2 mov dpl, r5 ; save low byte of new destination address in r5 2 mov dph, r6 ; save high byte of new destination address in r6 2 djnz r2, loop ; decrement count and do loop again if count <> 0 2
p reliminary W77IE58 publication release date: july 2000 - 45 - revision a1 machine cycles in standard 8032 = 10 + (26 * cnt) machine cycles in W77IE58 = 10 + (26 * cnt) if cnt = 50 clock cycles in standard 8032= ((10 + (26 *50)) * 12 = (10 + 1300) * 12 = 15720 clock cycles in W77IE58 = ((10 + (26 * 50 )) * 4 = (10 + 1300) * 4 = 5240 block move with two data pointers in W77IE58: ; sh and sl are the high and low bytes of source address ; dh and dl are the high and low bytes of destination address ; cnt is the number of bytes to be moved machine cy cles of W77IE58 # mov r2, #cnt ; load r2 with the count value 2 mov dps, #00h ; clear dps to point to dptr 2 mov dptr, #dhdl ; load dptr with destination address 3 inc dps ; set dps to point to dptr1 2 mov dptr, #shsl ; load dptr1 with sou rce address 3 loop: movx a, @dptr ; get data from source block 2 inc dptr ; increment source address 2 dec dps ; clear dps to point to dptr 2 movx @dptr, a ; write data to destination 2 inc dptr ; increment destination address 2 inc dps ; se t dps to point to dptr1 2 djnz r2, loop ; check if all done 3 machine cycles in W77IE58 = 12 + (15 * cnt) if cnt = 50 clock cycles in W77IE58 = (12 + (15 * 50)) * 4 = (12 + 750) * 4 = 3048 we can see that in the first program the standard 8032 takes 1 5720 cycles, while the W77IE58 takes only 5240 cycles for the same code. in the second program, written for the W77IE58, program execution requires only 3048 clock cycles. if the size of the block is increased then the saving is even greater. external data memory access timing the timing for the movx instruction is another feature of the W77IE58. in the standard 8032, the movx instruction has a fixed execution time of 2 machine cycles. however in the W77IE58, the duration of the access can be varied by the user. the instruction starts off as a normal op - code fetch of 4 clocks. in the next machine cycle, the W77IE58 puts out the address of the external data memory and the actual access occurs here. the user can change the duration of this access time by setti ng the stretch value. the clock control sfr (ckcon) has three bits that control the stretch value. these three bits are m2 - 0 (bits 2 - 0 of ckcon). these three bits give the user 8 different access time options. the stretch can be varied from 0 to 7, resulti ng in movx instructions that last from 2 to 9 machine cycles in length. note that the stretching of
p reliminary W77IE58 - 46 - the instruction only results in the elongation of the movx instruction, as if the state of the cpu was held for the desired period. there is no effect on an y other instruction or its timing. by default, the stretch value is set at 1, giving a movx instruction of 3 machine cycles. if desired by the user the stretch value can be set to 0 to give the fastest movx instruction of only 2 machine cycles. table 4. da ta memory cycle stretch values m2 m1 m0 machine cycles rd or wr strobe width in clocks rd or wr strobe width @ 25 mhz 0 0 0 2 2 80 ns 0 0 1 3(default) 4 160 ns 0 1 0 4 8 320 ns 0 1 1 5 12 480 ns 1 0 0 6 16 640 ns 1 0 1 7 20 800 ns 1 1 0 8 24 960 ns 1 1 1 9 28 1120 ns next instruction machine cycle second machine cycle first machine cycle last cycle of previous instruction c4 port 2 port 0 wr psen ale clk c3 c2 d0-d7 a0-a7 d0-d7 a0-a7 d0-d7 a0-a7 d0-d7 a15-a8 a15-a8 a15-a8 a15-a8 a0-a7 c1 c4 c3 c2 c1 c4 c3 c2 c1 c4 c3 c2 c1 movx instruction cycle next inst. read next inst. address movx data out movx data address movx inst. address movx inst . figure 8. data memory write with stretch value = 0
p reliminary W77IE58 publication release date: july 2000 - 47 - revision a1 next instruction machine cycle third machine cycle second machine cycle first machine cycle last cycle of previous instruction c4 port 2 port 0 wr psen ale clk c3 c2 d0-d7 a0-a7 d0-d7 a0-a7 d0-d7 a0-a7 d0-d7 a15-a8 a15-a8 a15-a8 a15-a8 a0-a7 c1 c4 c3 c2 c1 c4 c3 c2 c1 c4 c3 c2 c1 movx instruction cycle next inst. read next inst. address movx data out movx data address movx inst. address movx inst. c4 c3 c2 c1 figure 9. data memory write with stretch value = 1 next instruction machine cycle fourth machine cycle third machine cycle second machine cycle first machine cycle last cycle of previous instruction c4 port 2 port 0 wr psen ale clk c3 c2 d0-d7 a0-a7 d0-d7 a0-a7 d0-d7 a0-a7 d0-d7 a15-a8 a15-a8 a15-a8 a15-a8 a0-a7 c1 c4 c3 c2 c1 c4 c3 c2 c1 c4 c3 c2 c1 movx instruction cycle next inst. read next inst. address movx data out movx data address movx inst. address movx inst. c4 c3 c2 c1 c4 c3 c2 c1
p reliminary W77IE58 - 48 - figure 10. data memory write with stretch value = 2 wait state control signal either with the software using stretch value to change the required machine cycle of movx instruction, the W77IE58 provides another hardware signal wait to implement the wider duration of external data access timing. this wait state control signal is the alternate function of p4.0 such that it can only be invoked to 44 - pin plcc/qfp package type. the wait state control signal can be enabled by se tting ws (rommap.7) bit. when enabled, the setting of stretch value decides the minimum length of movx instruction cycle and the device will sample the wait pin at each c3 state before the rising edge of read/write strobe signal during m ovx instruction. once this signal being recongnized, one more machine cycle (wait state cycle) will be inserted into next cycle. the inserted wait state cycles are unlimited, so the movx instruction cycle will end in which the wait state control signal is deactivated. using wait state control signal allows a dynamically access timimg to a selected external peripheral. the ws bit is accessed by the timed access protection procedure. wait state control signal timing (when stretch = 1) c2 c3 c4 c1 clock ale psen address rd / wr c2 c3 c4 c1 c2 c3 c4 c1 c2 c3 c4 c1 c2 c3 c4 c1 movx instruction first machine cycle second machine cycle wait-state cycle third machine cycle wait sample wait sample wait extended duration original rising edge wait state control signal timing (when stretch = 2) c2 c3 c4 c1 clock ale psen address rd / wr c2 c3 c4 c1 c2 c3 c4 c1 c2 c3 c4 c1 c3 c4 c2 c1 movx instruction first machine cycle second machine cycle wait-state cycle third machine cycle wait sample wait sample wait extended duration original rising edge c2 c1 cycle fourth machine
p reliminary W77IE58 publication release date: july 2000 - 49 - revision a1 power management the W77IE58 has several features that help the user to control the power consumption of the device. the power saving features are basicall y the power down mode, economy mode and the idle mode of operation. idle mode the user can put the device into idle mode by writing 1 to the bit pcon.0. the instruction that sets the idle bit is the last instruction that will be executed before the device goes into idle mode. in the idle mode, the clock to the cpu is halted, but not to the interrupt, timer, watchdog timer and serial port blocks. this forces the cpu state to be frozen; the program counter, the stack pointer, the program status word, the accu mulator and the other registers hold their contents. the ale and psen pins are held high during the idle state. the port pins hold the logical states they had at the time idle was activated. the idle mode can be terminated in two ways. since the interrupt controller is still active, the activation of any enabled interrupt can wake up the processor. this will automatically clear the idle bit, terminate the idle mode, and the interrupt service routine(isr) will be executed. after the isr, execution of the pro gram will continue from the instruction which put the device into idle mode. the idle mode can also be exited by activating the reset. the device can be put into reset either by applying a high on the external rst pin, a power on reset condition or a watch dog timer reset. the external reset pin has to be held high for at least two machine cycles i.e. 8 clock periods to be recognized as a valid reset. in the reset condition the program counter is reset to 0000h and all the sfrs are set to the reset condition . since the clock is already running there is no delay and execution starts immediately. in the idle mode, the watchdog timer continues to run, and if enabled, a time - out will cause a watchdog timer interrupt which will wake up the device. the software mus t reset the watchdog timer in order to preempt the reset which will occur after 512 clock periods of the time - out. when the W77IE58 is exiting from an idle mode with a reset, the instruction following the one which put the device into idle mode is not exec uted. so there is no danger of unexpected writes. economy mode the power consumption of microcontroller relates to operating frequency. the W77IE58 offers a economy mode to reduce the internal clock rate dynamically without external components. by default, one machine cycle needs 4 clocks. in economy mode, software can select 4, 64 or 1024 clocks per machine cycle. it keeps the cpu operating at a acceptable speed but eliminates the power consumption. in the idle mode, the clock of the core logic is stopped, but all clocked peripherals such as watchdog timer are still running at a rate of clock/4. in the economy mode, all clocked peripherals run at the same reduced clocks rate as in core logic. so the economy mode may provide a lower power consumption than id le mode. software invokes the economy mode by setting the appropriate bits in the sfrs. setting the bits cd0(pmr.6), cd1(pmr.7) decides the instruction cycle rate as below: cd1 cd0 clocks/machine cycle 0 0 reserved 0 1 4 (default) 1 0 64
p reliminary W77IE58 - 50 - 1 1 1024
p reliminary W77IE58 publication release date: july 2000 - 51 - revision a1 the selection of instruction rate is going to take effect after a delay of one instruction cycle. switching to divide by 64 or 1024 mode must first go from divide by 4 mode. this means software can not switch directly between clock/64 and clock/1024 mode. the cpu has to return clock/4 mode first, then go to clock/64 or clock/1024 mode. the W77IE58 allows the user to use internal rc oscillator instead of external crystal. sett ing the xt/ rg bit (exif.3) selects the crystal or rc oscillator as the clock source. when invoking rc oscillator in economy mode, software may set the xtoff bit to turn off the crystal amplifier for saving power. the cpu would run at t he clock rate of approximately 2 - 4 mhz divided by 4, 64 or 1024. the rc oscillator is not precise so that can not be invoked to the operation which needs the accurate time - base such as serial communication. the rgmd(exif.2) indicates current clock source. when switching the clock source, cpu needs one instruction cycle delay to take effect new setting. if crystal amplifier is disabled and rc oscillator is present clock source, software must first clear the xtoff bit to turn on crystal amplifier before switc h to crystal operation. hardware will set the xtup bit (status.4) once the crystal is warm - up and ready for use. it is unable to set xt/ rg bit to 1 if xtup = 0. in economy mode, the serial port can not receive/transmit data correctly b ecause the baud rate is changed. in some systems, the external interrupts may require the fastest process such that the reducing of operating speed is restricted. in order to solve these dilemmas, the W77IE58 offers a switchback feature which allows the cp u back to clock/4 mode immediately when triggered by serial operation or external interrupts. the switchback feature is enabled by setting the swb bit (pmr.5). a serial port reception/transmission or qualified external interrupt which is enabled and acknow ledged without block conditions will cause cpu to return to divide by 4 mode. for the serial port reception, a switchback is generated by a falling edge associated with start bit if the serial port reception is enabled. when a serial port transmission, an instruction which writes a byte of data to serial port buffer will cause a switchback to ensure the correct transmission. the switchback feature is unaffected by serial port interrupt flags. after a switchback is generated, the software can manually return the cpu to economy mode. note that the modification of clock control bits cd0 and cd1 will be ignored during serial port transmit/receive when switchback is enabled. the watchdog timer reset, power - on/fail reset or external reset will force the cpu to ret urn to divide by 4 mode. power down mode the device can be put into power down mode by writing 1 to bit pcon.1. the instruction that does this will be the last instruction to be executed before the device goes into power down mode. in the power down mode, all the clocks are stopped and the device comes to a halt. all activity is completely stopped and the power consumption is reduced to the lowest possible value. in this state the ale and psen pins are pulled low. the port pins output the values held by their respective sfrs. the W77IE58 will exit the power down mode with a reset or by an external interrupt pin enabled as level detect. an external reset can be used to exit the power down state. the high on rst pin terminates the power down mode, and restarts the clock. the program execution will restart from 0000h. in the power down mode, the clock is stopped, so the watchdog timer cannot be used to provide the reset to exit power down mode.
p reliminary W77IE58 - 52 - the W77IE58 can be woken from the power down mod e by forcing an external interrupt pin activated, provided the corresponding interrupt is enabled, while the global enable(ea) bit is set and the external input has been set to a level detect mode. if these conditions are met, then the low level on the ext ernal pin re - starts the oscillator. then device executes the interrupt service routine for the corresponding external interrupt. after the interrupt service routine is completed, the program execution returns to the instruction after the one which put the device into power down mode and continues from there. when rgsl(exif.1) bit is set to 1, the cpu will use the internal rc oscillator instead of crystal to exit power down mode. the microcontroller will automatically switch from rc oscillator to crystal aft er clock is stable. the rc oscillator runs at approximately 2 - 4 mhz. using rc oscillator to exit from power down mode saves the time for waiting crystal start - up. it is useful in the low power system which usually be awakened from a short operation then re turns to power down mode. table 5. status of external pins during idle and power down mode program memory ale psen port0 port1 port2 port3 idle internal 1 1 data data data data idle external 1 1 float data address data power down inte rnal 0 0 data data data data power down external 0 0 float data data data reset conditions the user has several hardware related options for placing the W77IE58 into reset condition. in general, most register bits go to their reset value irrespective of the reset condition, but there are a few flags whose state depends on the source of reset. the user can use these flags to determine the cause of reset using software. there are two ways of putting the device into reset state. they are external reset and w atchdog reset. external reset the device continuously samples the rst pin at state c4 of every machine cycle. therefore the rst pin must be held for at least 2 machine cycles to ensure detection of a valid rst high. the reset circuitry then synchronously a pplies the internal reset signal. thus the reset is a synchronous operation and requires the clock to be running to cause an external reset. once the device is in reset condition, it will remain so as long as rst is 1. even after rst is deactivated, the de vice will continue to be in reset state for up to two machine cycles, and then begin program execution from 0000h. there is no flag associated with the external reset condition. however since the other two reset sources have flags, the external reset can b e considered as the default reset if those two flags are cleared. the software must clear the por flag after reading it, otherwise it will not be possible to correctly determine future reset sources. if the power fails, i.e. falls below vrst, then the devi ce will once again go into reset state. when the power returns to the proper operating levels, the device will again perform a power on reset delay and set the por flag.
p reliminary W77IE58 publication release date: july 2000 - 53 - revision a1 watchdog timer reset the watchdog timer is a free running timer with programmable tim e - out intervals. the user can clear the watchdog timer at any time, causing it to restart the count. when the time - out interval is reached an interrupt flag is set. if the watchdog reset is enabled and the watchdog timer is not cleared, then 512 clocks fro m the flag being set, the watchdog timer will generate a reset . this places the device into the reset condition. the reset condition is maintained by hardware for two machine cycles. once the reset is removed the device will begin execution from 0000h. re set state most of the sfrs and registers on the device will go to the same condition in the reset state. the program counter is forced to 0000h and is held there as long as the reset condition is applied. however, the reset state does not affect the on - chi p ram. the data in the ram will be preserved during the reset. however, the stack pointer is reset to 07h, and therefore the stack contents will be lost. the ram contents will be lost if the v dd falls below approximately 2v, as this is the minimum voltage level required for the ram to operate normally. therefore after a first time power on reset the ram contents will be indeterminate. during a power fail condition, if the power falls below 2v, the ram contents are lost. after a reset most sfrs are cleared. interrupts and timers are disabled. the watchdog timer is disabled if the reset source was a por. the port sfrs have ffh written into them which puts the port pins in a high state. port 0 floats as it does not have on - chip pull - ups. table 6. sfr reset valu e sfr name reset value sfr name reset value p0 11111111b ie 00000000b sp 00000111b saddr 00000000b dpl 00000000b p3 11111111b dph 00000000b ip x0000000b dpl1 00000000b saden 00000000b dph1 00000000b t2con 00000000b dps 00000000b t2mod 00000x00b pco n 00xx0000b rcap2l 00000000b tcon 00000000b rcap2h 00000000b tmod 00000000b tl2 00000000b tl0 00000000b th2 00000000b tl1 00000000b ta 11111111b th0 00000000b psw 00000000b th1 00000000b wdcon 0x0x0xx0b ckcon 00000001b acc 00000000b p1 11111111b ei e xxx 00000b
p reliminary W77IE58 - 54 - table 6. sfr reset value, continued sfr name reset value sfr name reset value scon 00000000b b 00000000b sbuf xxxxxxxx b eip xxx00000b p2 11111111b pc 00000000b saddr1 00000000b saden1 00000000b scon1 00000000b sbuf1 xxxxxxxx b rommap 01 x xx 110b pmr 010xx0x0b exif 0000 xxx 0b status 000x0000b p4 xxxx 1111b the wdcon sfr bits are set/cleared in reset condition depending on the source of the reset. external reset watchdog reset power on reset wdcon 0x0x0xx0b 0x0x01x0b 01000000b the p or bit wdcon.6 is set only by the power on reset. the pfi bit wdcon.4 is set when the power fail condition occurs. however, a power - on reset will clear this bit. the wtrf bit wdcon.2 is set when the watchdog timer causes a reset. a power on reset will also clear this bit. the ewt bit wdcon.1 is cleared by power on resets. this disables the watchdog timer resets. a watchdog or external reset does not affect the ewt bit. interrupts the W77IE58 has a two priority level interrupt structure with 12 interrupt sou rces. each of the interrupt sources has an individual priority bit, flag, interrupt vector and enable bit. in addition, the interrupts can be globally enabled or disabled. interrupt sources the external interrupts int 0 and int 1 can be either edge triggered or level triggered, depending on bits it0 and it1. the bits ie0 and ie1 in the tcon register are the flags which are checked to generate the interrupt. in the edge triggered mode, the intx inputs are sampled in every machine cycle. if the sample is high in one cycle and low in the next, then a high to low transition is detected and the interrupts request flag iex in tcon or exif is set. the flag bit requests the interrupt. since the external interrupts are sampled eve ry machine cycle, they have to be held high or low for at least one complete machine cycle. the iex flag is automatically cleared when the service routine is called. if the level triggered mode is selected, then the requesting source has to hold the pin lo w till the interrupt is serviced. the iex flag will not be cleared by the hardware on entering the service routine. if the interrupt continues to be held low even after the service routine is completed, then the processor may acknowledge another interrupt request from the same source. note that the external interrupts int2 to int 5 are edge triggered only. by default, the individual interrupt flag corresponding to external interrupt 2 to 5 must be cleared manually by software. it can be co nfigured with hardware cleared by setting the corresponding bit hcx in the t2mod register. for instance, if hc2 is set hardware will clear ie2 flag after program enters the interrupt 2 service routine.
p reliminary W77IE58 publication release date: july 2000 - 55 - revision a1 the timer 0 and 1 interrupts are generated by the tf0 and tf1 flags. these flags are set by the overflow in the timer 0 and timer 1. the tf0 and tf1 flags are automatically cleared by the hardware when the timer interrupt is serviced. the timer 2 interrupt is generated by a logical or of the tf2 and the exf2 flags. these flags are set by overflow or capture/reload events in the timer 2 operation. the hardware does not clear these flags when a timer 2 interrupt is executed. software has to resolve the cause of the interrupt between tf2 and exf2 and clear the a ppropriate flag. the watchdog timer can be used as a system monitor or a simple timer. in either case, when the time - out count is reached, the watchdog timer interrupt flag wdif (wdcon.3) is set. if the interrupt is enabled by the enable bit eie.4, then an interrupt will occur. the serial block can generate interrupts on reception or transmission. there are two interrupt sources from the serial block, which are obtained by the ri and ti bits in the scon sfr and ri_1 and ti_1 in the scon1 sfr. these bits are not automatically cleared by the hardware, and the user will have to clear these bits using software. all the bits that generate interrupts can be set or reset by hardware, and thereby software initiated interrupts can be generated. each of the individual interrupts can be enabled or disabled by setting or clearing a bit in the ie sfr. ie also has a global enable/disable bit ea, which can be cleared to disable all the interrupts, except pfi, at once. priority level structure there are three priority levels for the interrupts, highest, high and low. the interrupt sources can be individually set to either high or low levels. naturally, a higher priority interrupt cannot be interrupted by a lower priority interrupt. however there exists a pre - defined hierarchy amongst the interrupts themselves. this hierarchy comes into play when the interrupt controller has to resolve simultaneous requests having the same priority level. this hierarchy is defined as shown below; the interrupts are numbered starting from the hi ghest priority to the lowest. table 7. priority structure of interrupts source flag priority level external interrupt 0 ie0 1(highest) timer 0 overflow tf0 2 external interrupt 1 ie1 3 timer 1 overflow tf1 4 serial port ri + ti 5 timer 2 overflow t f2 + exf2 6 serial port 1 ri_1 + ti_1 7 external interrupt 2 ie2 8 external interrupt 3 ie3 9 external interrupt 4 ie4 10 external interrupt 5 ie5 11 watchdog timer wdif 12 (lowest)
p reliminary W77IE58 - 56 - the interrupt flags are sampled every machine cycle. in the same m achine cycle, the sampled interrupts are polled and their priority is resolved. if certain conditions are met then the hardware will execute an internally generated lcall instruction which will vector the process to the appropriate interrupt vector address . the conditions for generating the lcall are 1. an interrupt of equal or higher priority is not currently being serviced. 2. the current polling cycle is the last machine cycle of the instruction currently being executed. 3. the current instruction does n ot involve a write to ip, ie, eip or eie registers and is not a reti. if any of these conditions are not met, then the lcall will not be generated. the polling cycle is repeated every machine cycle, with the interrupts sampled in the same machine cycle. if an interrupt flag is active in one cycle but not responded to, and is not active when the above conditions are met, the denied interrupt will not be serviced. this means that active interrupts are not remembered; every polling cycle is new. the processor responds to a valid interrupt by executing an lcall instruction to the appropriate service routine. this may or may not clear the flag which caused the interrupt. in case of timer interrupts, the tf0 or tf1 flags are cleared by hardware whenever the proces sor vectors to the appropriate timer service routine. in case of external interrupt, int0 and int1, the flags are cleared only if they are edge triggered. in case of serial interrupts, the flags are not cleared by hardware. in the case of timer 2 interrupt , the flags are not cleared by hardware. the watchdog timer interrupt flag wdif has to be cleared by software. the hardware lcall behaves exactly like the software lcall instruction. this instruction saves the program counter contents onto the stack, but d oes not save the program status word psw. the pc is reloaded with the vector address of that interrupt which caused the lcall. these vector address for the different sources are as follows table 8. vector locations for interrupt sources source vector addr ess source vector address timer 0 overflow 000bh external interrupt 0 0003h timer 1 overflow 001bh external interrupt 1 0013h timer 2 interrupt 002bh serial port 0023h external interrupt 2 0043h serial port 1 003bh external interrupt 4 0053h external interrupt 3 004bh watchdog timer 0063h external interrupt 5 005bh the vector table is not evenly spaced; this is to accommodate future expansions to the device family.
p reliminary W77IE58 publication release date: july 2000 - 57 - revision a1 execution continues from the vectored address till an reti instruction is executed. on execution of the reti instruction the processor pops the stack and loads the pc with the contents at the top of the stack. the user must take care that the status of the stack is restored to what is was after the hardware lcall, if the execution is to r eturn to the interrupted program. the processor does not notice anything if the stack contents are modified and will proceed with execution from the address put back into pc. note that a ret instruction would perform exactly the same process as a reti inst ruction, but it would not inform the interrupt controller that the interrupt service routine is completed, and would leave the controller still thinking that the service routine is underway. interrupt response time the response time for each interrupt sour ce depends on several factors, such as the nature of the interrupt and the instruction underway. in the case of external interrupts int 0 to int 5 , they are sampled at c3 of every machine cycle and then their correspondi ng interrupt flags iex will be set or reset. the timer 0 and 1 overflow flags are set at c3 of the machine cycle in which overflow has occurred. these flag values are polled only in the next machine cycle. if a request is active and all three conditions ar e met, then the hardware generated lcall is executed. this lcall itself takes four machine cycles to be completed. thus there is a minimum time of five machine cycles between the interrupt flag being set and the interrupt service routine being executed. a longer response time should be anticipated if any of the three conditions are not met. if a higher or equal priority is being serviced, then the interrupt latency time obviously depends on the nature of the service routine currently being executed. if the polling cycle is not the last machine cycle of the instruction being executed, then an additional delay is introduced. the maximum response time (if no other interrupt is in service) occurs if the W77IE58 is performing a write to ie, ip, eie or eip and the n executes a mul or div instruction. from the time an interrupt source is activated, the longest reaction time is 12 machine cycles. this includes 1 machine cycle to detect the interrupt, 2 machine cycles to complete the ie, ip, eie or eip access, 5 machin e cycles to complete the mul or div instruction and 4 machine cycles to complete the hardware lcall to the interrupt vector location. thus in a single - interrupt system the interrupt response time will always be more than 5 machine cycles and not more than 12 machine cycles. the maximum latency of 12 machine cycle is 48 clock cycles. note that in the standard 8051 the maximum latency is 8 machine cycles which equals 96 machine cycles. this is a 50% reduction in terms of clock periods. programmable timers/ cou nters the W77IE58 has three 16 - bit programmable timer/counters and one programmable watchdog timer. the watchdog timer is operationally quite different from the other two timers. timer/counters 0 & 1 the W77IE58 has two 16 - bit timer/counters. each of these timer/counters has two 8 bit registers which form the 16 bit counting register. for timer/counter 0 they are th0, the upper 8 bits register, and tl0, the lower 8 bit register. similarly timer/counter 1 has two 8 bit registers, th1 and tl1. the two can be configured to operate either as timers, counting machine cycles or as counters counting external inputs.
p reliminary W77IE58 - 58 - when configured as a "timer", the timer counts clock cycles. the timer clock can be programmed to be thought of as 1/12 of the system clock or 1/4 of the system clock. in the "counter" mode, the register is incremented on the falling edge of the external input pin, t0 in case of timer 0, and t1 for timer 1. the t0 and t1 inputs are sampled in every machine cycle at c4. if the sampled value is high in on e machine cycle and low in the next, then a valid high to low transition on the pin is recognized and the count register is incremented. since it takes two machine cycles to recognize a negative transition on the pin, the maximum rate at which counting wil l take place is 1/24 of the master clock frequency. in either the "timer" or "counter" mode, the count register will be updated at c3. therefore, in the "timer" mode, the recognized negative transition on pin t0 and t1 can cause the count register value to be updated only in the machine cycle following the one in which the negative edge was detected. the "timer" or "counter" function is selected by the " c t / " bit in the tmod special function register. each timer/counter has one selection bit for its own; bit 2 of tmod selects the function for timer/counter 0 and bit 6 of tmod selects the function for timer/counter 1. in addition each timer/counter can be set to operate in any one of four possible modes. the mode selection is done by bits m 0 and m1 in the tmod sfr. time - base selection the W77IE58 gives the user two modes of operation for the timer. the timers can be programmed to operate like the standard 8051 family, counting at the rate of 1/12 of the clock speed. this will ensure that tim ing loops on the W77IE58 and the standard 8051 can be matched. this is the default mode of operation of the W77IE58 timers. the user also has the option to count in the turbo mode, where the timers will increment at the rate of 1/4 clock speed. this will s traight - away increase the counting speed three times. this selection is done by the t0m and t1m bits in ckcon sfr. a reset sets these bits to 0, and the timers then operate in the standard 8051 mode. the user should set these bits to 1 if the timers are to operate in turbo mode. mode 0 in mode 0, the timer/counters act as a 8 bit counter with a 5 bit, divide by 32 pre - scale. in this mode we have a 13 bit timer/counter. the 13 bit counter consists of 8 bits of thx and 5 lower bits of tlx. the upper 3 bits o f tlx are ignored. the negative edge of the clock increments the count in the tlx register. when the fifth bit in tlx moves from 1 to 0, then the count in the thx register is incremented. when the count in thx moves from ffh to 00h, then the overflow flag tfx in tcon sfr is set. the counted input is enabled only if trx is set and either gate = 0 or intx = 1. when c t / is set to 0, then it will count clock cycles, and if c t / is set to 1, then it will count 1 to 0 transitions on t0 (p3.4) for timer 0 and t1 (p3.5) for timer 1. when the 13 bit count reaches 1fffh the next count will cause it to roll - over to 0000h. the timer overflow flag tfx of the relevant timer is set and if enabled an interrupts will occur. note that when used as a timer, the time - base may be either clock cycles/12 or clock cycles/4 as selected by the bits txm of the ckcon sfr.
p reliminary W77IE58 publication release date: july 2000 - 59 - revision a1 1/4 1/12 c/t = tmod.2 (c/t = tmod.6) t0m = ckcon.3 (t1m = ckcon.4) m1, m0 = tmod.1, tmod.0 (m1, m0 = tmod.5, tmod.4) interrupt t0 = p3.4 (t1 = p3.5) th0 (th1) tl0 (tl1) tf0 (tf1) tr0 = tcon.4 (tr1 = tcon.6) gate = tmod.3 (gate = tmod.7) int0 = p3.2 (int1 = p3.3) 7 0 tfx 4 7 0 timer 1 functions are shown in brackets 1 00 0 0 1 01 clock source mode input div. by 4 osc/1 div. by 64 osc/16 div. by 1024 osc/256 figure 11. timer/counter mode 0 & mode 1 mode 1 mode 1 is similar to mode 0 except tha t the counting register forms a 16 bit counter, rather than a 13 bit counter. this means that all the bits of thx and tlx are used. roll - over occurs when the timer moves from a count of ffffh to 0000h. the timer overflow flag tfx of the relevant timer is s et and if enabled an interrupt will occur. the selection of the time - base in the timer mode is similar to that in mode 0. the gate function operates similarly to that in mode 0. mode 2 in mode 2, the timer/counter is in the auto reload mode. in this mode, tlx acts as a 8 bit count register, while thx holds the reload value. when the tlx register overflows from ffh to 00h, the tfx bit in tcon is set and tlx is reloaded with the contents of thx, and the counting process continues from here. the reload operat ion leaves the contents of the thx register unchanged. counting is enabled by the trx bit and proper setting of gate and intx pins. as in the other two modes 0 and 1 mode 2 allows counting of either clock cycles (clock/12 or clock/4) or pulses on pin tn.
p reliminary W77IE58 - 60 - 1/4 1/12 t0m = ckcon.3 (t1m = ckcon.4) c/t = tmod.2 (c/t = tmod.6) interrupt t0 = p3.4 (t1 = p3.5) th0 (th1) tl0 (tl1) tf0 (tf1) tr0 = tcon.4 (tr1 = tcon.6) gate = tmod.3 (gate = tmod.7) int0 = p3.2 (int1 = p3.3) 7 0 tfx 7 0 timer 1 functions are shown in brackets 1 0 0 1 clock source mode input div. by 4 osc/1 div. by 64 osc/16 div. by 1024 osc/256 figure 12. timer/counter mode 2. mode 3 mode 3 has different operating methods for the two timer/counters. for timer/counter 1, mode 3 simply freezes the counter. timer/counter 0, however, configures tl0 and th0 as t wo separate 8 bit count registers in this mode. the logic for this mode is shown in the figure. tl0 uses the timer/counter 0 control bits c t / , gate, tr0, int 0 and tf0. the tl0 can be used to count clock cycles (clock/ 12 or clock/4) or 1 - to - 0 transitions on pin t0 as determined by c/t (tmod.2). th0 is forced as a clock cycle counter (clock/12 or clock/4) and takes over the use of tr1 and tf1 from timer/counter 1. mode 3 is used in cases where an extra 8 bit timer is nee ded. with timer 0 in mode 3, timer 1 can still be used in modes 0, 1 and 2., but its flexibility is somewhat limited. while its basic functionality is maintained, it no longer has control over its overflow flag tf1 and the enable bit tr1. timer 1 can still be used as a timer/counter and retains the use of gate and int1 pin. in this condition it can be turned on and off by switching it out of and into its own mode 3. it can also be used as a baud rate generator for the serial port. timer/counter 2 timer/coun ter 2 is a 16 bit up/down counter which is configured by the t2mod register and controlled by the t2con register. timer/counter 2 is equipped with a capture/reload capability. as with the timer 0 and timer 1 counters, there exists considerable flexibility in selecting and controlling the clock, and in defining the operating mode. the clock source for timer/counter 2 may be selected for either the external t2 pin (c/t2 = 1) or the crystal oscillator, which is divided by 12 or 4 (c/t2 = 0). the clock is then enabled when tr2 is a 1, and disabled when tr2 is a 0. timer/counter2 setting mode r clk +t clk cp/rl2 t2oe auto - reload 0 0 0 capture 0 1 x baud rate generator 1 x 0 clock out mode x 0 1
p reliminary W77IE58 publication release date: july 2000 - 61 - revision a1 1/4 1/12 t0m = ckcon.3 interrupt c/t = tmod.2 t0 = p3.4 th0 tl0 tr0 = tcon.4 gate = tmod.3 tr1 = tcon.6 int0 = p3.2 7 0 tf1 7 0 interrupt tf0 1 0 0 1 clock source mode input div. by 4 osc/1 div. by 64 osc/16 div. by 1024 osc/256 figure 13. timer/counter 0 mode 3 capture m ode the capture mode is enabled by setting the cp rl / 2 bit in the t2con register to a 1, rclk and tclk bits must be cleared. in the capture mode, timer/counter 2 serves as a 16 bit up counter. when the counter rolls over from ffffh to 0000h , the tf2 bit is set, which will generate an interrupt request. if the exen2 bit is set, then a negative transition of t2ex pin will cause the value in the tl2 and th2 register to be captured by the rcap2l and rcap2h registers. this action also causes the exf2 bit in t2con to be set, which will also generate an interrupt. setting the t2cr bit (t2mod.3), the W77IE58 allows hardware to reset timer 2 automatically after the value of tl2 and th2 have been captured. 1/4 clock source mode input div. by 4 osc/1 div. by 64 osc/16 div. by 1024 osc/256 1/12 t2m = ckcon.5 c/t2 = t2con.1 t2con.7 t2 = p1.0 t2con.6 tr2 = t2con.2 t2ex = p1.1 exen2 = t2con.3 exf2 timer 2 interrupt tf2 th2 tl2 rcap2h rcap2l 1 0 0 1 figure 14. 16 - bit captur e mode
p reliminary W77IE58 - 62 - auto - reload mode, counting up the auto - reload mode as an up counter is enabled by clearing the cp rl / 2 bit in the t2con register. rclk and tclk bits must be cleared and clearing the dcen bit in t2mod register. in this mode, timer/co unter 2 is a 16 bit up counter. when the counter rolls over from ffffh, a reload is generated that causes the contents of the rcap2l and rcap2h registers to be reloaded into the tl2 and th2 registers. the reload action also sets the tf2 bit. if the exen2 b it is set, then a negative transition of t2ex pin will also cause a reload. this action also sets the exf2 bit in t2con. 1/4 1/12 t2m = ckcon.5 c/t2 = t2con.1 t2con.7 t2 = p1.0 t2con.6 tr2 = t2con.2 t2ex = p1.1 exen2 = t2con.3 exf2 timer 2 interrupt tf2 th2 tl2 rcap2h rcap2l 1 0 0 1 clock source mode input div. by 4 osc/1 div. by 64 osc/16 div. by 1024 osc/256 dcen = 0 figure 15. 16 - bit auto - reload mode, counting up auto - reload mode, counting up/down timer/counter 2 will be in au to - reload mode as an up/down counter if cp rl / 2 bit in t2con is cleared. rclk and tclk bits must be cleared and the dcen bit in t2mod is set. in this mode, timer/counter 2 is an up/down counter whose direction is controlled by the t2ex pin. a 1 on this pin cause the counter to count up. an overflow while counting up will cause the counter to be reloaded with the contents of the capture registers. the next down count following the case where the contents of timer/counter equal the capture reg isters will load an ffffh into timer/counter 2. in either event a reload will set the tf2 bit. a reload will also toggle the exf2 bit. however, the exf2 bit can not generate an interrupt while in this mode.
p reliminary W77IE58 publication release date: july 2000 - 63 - revision a1 c/t = t2con.1 1/4 1/12 t2m = ckcon.5 down counting reload value t2con .7 up counting reload value t2 = p1.0 t2con.6 tr2 = t2con.2 t2ex = p1.1 exf2 timer 2 interrupt tf2 th2 tl2 rcap2h rcap2l 1 0 0 1 0ffh 0ffh dcen = 1 clock source mode input div. by 4 osc/1 div. by 64 osc/16 div. by 1024 osc/256 figure 16. 16 - bit auto - rel oad up/down counter baud rate generator mode the baud rate generator mode is enabled by setting either the rclk or tclk bits in t2con register. while in the baud rate generator mode, timer/counter 2 is a 16 bit counter with auto reload when the count roll s over from ffffh. however, rolling over does not set the tf2 bit. if exen2 bit is set, then a negative transition of the t2ex pin will set exf2 bit in the t2con register and cause an interrupt request. t2oe bit must be cleared in this mode. c/t = t2con.1 t2 = p1.0 t2con.6 tr2 = t2con.2 t2ex = p1.1 exen2 = t2con.3 exf2 timer 2 overflow timer 2 interrupt th2 tl2 rcap2h rcap2l 0 1 clock source mode input div. by 4 osc/2 div. by 64 osc/32 div. by 1024 osc/512 figure 17. baud rate generator mode
p reliminary W77IE58 - 64 - programmable clock - out timer 2 is equipped with a new clock - out feature which outputs a 50% duty cycle clock on p1.0. it can be invoked as a programmable clock generator. to configure timer 2 with clock - out mode , software must initiate it by setting bit t2oe = 1, c/t2 = 0 and cp/rl = 0. setting bit tr2 will start the timer. this mode is similar to the baud rate generator mode, it will not generate an interrupt while timer 2 overflow. so it is possible to use tim er 2 as a baud rate generator and a clock generator at the same time. the clock - out frequency is determined by the following equation: the clock - out frequency = oscillator frequency / [4 x (65536 - rcap2h, rcap2l)] t2con.6 tr2 = t2con.2 t2ex = p1.1 exen2 = t2con.3 exf2 t2 = p1.0 timer 2 interrupt th2 tl2 rcap2h rcap2l clock source mode input div. by 4 osc/2 div. by 64 osc/32 div. by 1024 osc/512 1/2 t20e figure 18. programmab le clock - out mode watchdog timer the watchdog timer is a free - running timer which can be programmed by the user to serve as a system monitor, a time - base generator or an event timer. it is basically a set of dividers that divide the system clock. the div ider output is selectable and determines the time - out interval. when the time - out occurs a flag is set, which can cause an interrupt if enabled, and a system reset can also be caused if it is enabled. the interrupt will occur if the individual interrupt en able and the global enable are set. the interrupt and reset functions are independent of each other and may be used separately or together depending on the users software.
p reliminary W77IE58 publication release date: july 2000 - 65 - revision a1 16 wd1, wd0 00 01 10 11 interrupt reset enable watchdog timer reset ewt(wdcon.1) reset watchdog rwt (wdcon.0) 0 17 19 20 22 23 25 time-out wdif wtrf 512 clock delay ewdi(eie.4) clock source mode input div. by 4 osc/1 div. by 64 osc/16 div. by 1024 osc/256 watchdog figure 19. watchdog timer the watchdog timer should first be restarted by using rwt. this ensures that the timer starts from a known state. the rwt bit is used to restart the watchdog timer. this bit is self clearing, i.e. after writing a 1 to this bit the software will automatically clear it. the watchdog timer wil l now count clock cycles. the time - out interval is selected by the two bits wd1 and wd0 (ckcon.7 and ckcon.6). when the selected time - out occurs, the watchdog interrupt flag wdif (wdcon.3) is set. after the time - out has occurred, the watchdog timer waits f or an additional 512 clock cycles. if the watchdog reset ewt (wdcon.1) is enabled, then 512 clocks after the time - out, if there is no rwt, a system reset due to watchdog timer will occur. this will last for two machine cycles, and the watchdog timer reset flag wtrf (wdcon.2) will be set. this indicates to the software that the watchdog was the cause of the reset. when used as a simple timer, the reset and interrupt functions are disabled. the timer will set the wdif flag each time the timer completes the se lected time interval. the wdif flag is polled to detect a time - out and the rwt allows software to restart the timer. the watchdog timer can also be used as a very long timer. the interrupt feature is enabled in this case. every time the time - out occurs an interrupt will occur if the global interrupt enable ea is set. the main use of the watchdog timer is as a system monitor. this is important in real - time control applications. in case of some power glitches or electro - magnetic interference, the processor ma y begin to execute errant code. if this is left unchecked the entire system may crash. using the watchdog timer interrupt during software development will allow the user to select ideal watchdog reset locations. the code is first written without the watchd og interrupt or reset. then the watchdog interrupt is enabled to identify code locations where interrupt occurs. the user can now insert instructions to reset the watchdog timer which will allow the code to run without any watchdog timer interrupts. now th e watchdog timer reset is enabled and the watchdog interrupt may be disabled. if any errant code is executed now, then the reset watchdog timer instructions will not be executed at the required instants and watchdog reset will occur. the watchdog time - out selection will result in different time - out values depending on the clock speed. the reset, when enabled, will occur 512 clocks after the time - out has occurred.
p reliminary W77IE58 - 66 -
p reliminary W77IE58 publication release date: july 2000 - 67 - revision a1 table 9. time - out values for the watchdog timer wd1 wd0 watchdog interval number of clocks tim e @ 1.8432 mhz time @ 10 mhz time @ 25 mhz 0 0 2 17 131072 71.11 ms 13.11 ms 5.24 ms 0 1 2 20 1048576 568.89 ms 104.86 ms 41.94 ms 1 0 2 23 8388608 4551.11 ms 838.86 ms 335.54 ms 1 1 2 26 67108864 36408.88 ms 6710.89 ms 2684.35 ms the watchdog timer will de disabled by a power - on/fail reset. the watchdog timer reset does not disable the watchdog timer, but will restart it. in general, software should restart the timer to put it into a known state. the control bits that support the watchdog timer are discu ssed below. watchdog control wdif: wdcon.3 - watchdog timer interrupt flag. this bit is set whenever the time - out occurs in the watchdog timer. if the watchdog interrupt is enabled (eie.4), then an interrupt will occur (if the global interrupt enable is se t and other interrupt requirements are met). software or any reset can clear this bit. wtrf: wdcon.2 - watchdog timer reset flag. this bit is set whenever a watchdog reset occurs. this bit is useful for determined the cause of a reset. software must read i t, and clear it manually. a power - fail reset will clear this bit. if ewt = 0, then this bit will not be affected by the watchdog timer. ewt: wdcon.1 - enable watchdog timer reset. this bit when set to 1 will enable the watchdog timer reset function. setti ng this bit to 0 will disable the watchdog timer reset function, but will leave the timer running. rwt: wdcon.0 - reset watchdog timer. this bit is used to clear the watchdog timer and to restart it. this bit is self - clearing, so after the software writes 1 to it the hardware will automatically clear it. if the watchdog timer reset is enabled, then the rwt has to be set by the user within 512 clocks of the time - out. if this is not done then a watchdog timer reset will occur. clock control wd1, wd0: ckcon.7, ckcon.6 - watchdog timer mode select bits. these two bits select the time - out interval for the watchdog timer. the reset time is 512 clock longer than the interrupt time - out value. the default watchdog time - out is 2 17 clocks, which is the shortest time - o ut period. the ewt, wdif and rwt bits are protected by the timed access procedure. this prevents software from accidentally enabling or disabling the watchdog timer. more importantly, it makes it highly improbable that errant code can enable or disable the watchdog timer.
p reliminary W77IE58 - 68 - serial port serial port in the W77IE58 is a full duplex port. the W77IE58 provides the user with additional features such as the frame error detection and the automatic address recognition. the serial ports are capable of synchronous as w ell as asynchronous communication. in synchronous mode the W77IE58 generates the clock and operates in a half duplex mode. in the asynchronous mode, full duplex operation is available. this means that it can simultaneously transmit and receive data. the tr ansmit register and the receive buffer are both addressed as sbuf special function register. however any write to sbuf will be to the transmit register, while a read from sbuf will be from the receive buffer register. the serial port can operate in four di fferent modes as described below. mode 0 this mode provides synchronous communication with external devices. in this mode serial data is transmitted and received on the rxd line. txd is used to transmit the shift clock. the txd clock is provided by the w77 ie58 whether the device is transmitting or receiving. this mode is therefore a half duplex mode of serial communication. in this mode, 8 bits are transmitted or received per frame. the lsb is transmitted/received first. the baud rate is fixed at 1/12 or 1/ 4 of the oscillator frequency. this baud rate is determined by the sm2 bit (scon.5). when this bit is set to 0, then the serial port runs at 1/12 of the clock. when set to 1, the serial port runs at 1/4 of the clock. this additional facility of programmabl e baud rate in mode 0 is the only difference between the standard 8051 and the W77IE58. the functional block diagram is shown below. data enters and leaves the serial port on the rxd line. the txd line is used to output the shift clock. the shift clock is used to shift data into and out of the W77IE58 and the device at the other end of the line. any instruction that causes a write to sbuf will start the transmission. the shift clock will be activated and data will be shifted out on the rxd pin till all 8 bi ts are transmitted. if sm2 = 1, then the data on rxd will appear 1 clock period before the falling edge of shift clock on txd. the clock on txd then remains low for 2 clock periods, and then goes high again. if sm2 = 0, the data on rxd will appear 3 clock periods before the falling edge of shift clock on txd. the clock on txd then remains low for 6 clock periods, and then goes high again. this ensures that at the receiving end the data on rxd line can either be clocked on the rising edge of the shift clock on txd or latched when the txd clock is low.
p reliminary W77IE58 publication release date: july 2000 - 69 - revision a1 sbuf transmit shift register receive shift register tx shift parout internal data bus internal data bus rxd p3.0 alternate output function txd p3.1 alternate output function rxd p3.0 alternate iutput function serial port interrupt write to sbuf tx start sout ti ri ren parin load clock read sbuf sbuf tx clock ri serial controlle shift clock rx clock load sbuf rx start rx shift clock sin 4 12 1 0 sm2 clock source mode input div. by 4 osc/1 div. by 64 osc/16 div. by 1024 osc/256 figure 20. serial port mode 0 the ti flag is set high in c1 following the end of transmission of the last bit. the serial port will receive data when ren is 1 and ri is zero. the shift cloc k (txd) will be activated and the serial port will latch data on the rising edge of shift clock. the external device should therefore present data on the falling edge on the shift clock. this process continues till all the 8 bits have been received. the ri flag is set in c1 following the last rising edge of the shift clock on txd. this will stop reception, till the ri is cleared by software. mode 1 in mode 1, the full duplex asynchronous mode is used. serial communication frames are made up of 10 bits trans mitted on txd and received on rxd. the 10 bits consist of a start bit (0), 8 data bits (lsb first), and a stop bit (1). on receive, the stop bit goes into rb8 in the sfr scon. the baud rate in this mode is variable. the serial baud can be programmed to be 1/16 or 1/32 of the timer 1 overflow. since the timer 1 can be set to different reload values, a wide variation in baud rates is possible. transmission begins with a write to sbuf. the serial data is brought out on to txd pin at c1 following the first roll - over of divide by 16 counter. the next bit is placed on txd pin at c1 following the next rollover of the divide by 16 counter. thus the transmission is synchronized to the divide by 16 counter and not directly to the write to sbuf signal. after all 8 bits of data are transmitted, the stop bit is transmitted. the ti flag is set in the c1 state after the stop bit has been put out on txd pin. this will be at the 10th rollover of the divide by 16 counter after a write to sbuf. reception is enabled only if ren is high. the serial port actually starts the receiving of serial data, with the detection of a falling edge on the rxd pin. the 1 - to - 0 detector continuously monitors the rxd line, sampling it at the rate of 16 times the selected baud rate. when a falling e dge is detected, the divide by 16 counter is immediately reset. this helps to align the bit boundaries with the rollovers of the divide by 16 counter.
p reliminary W77IE58 - 70 - the 16 states of the counter effectively divide the bit time into 16 slices. the bit detection is done on a best of three basis. the bit detector samples the rxd pin, at the 8th, 9th and 10th counter states. by using a majority 2 of 3 voting system, the bit value is selected. this is done to improve the noise rejection feature of the serial port. if the first bit detected after the falling edge of rxd pin is not 0, then this indicates an invalid start bit, and the reception is immediately aborted. the serial port again looks for a falling edge in the rxd line. if a valid start bit is detected, then the rest of the bits are also detected and shifted into the sbuf. after shifting in 8 data bits, there is one more shift to do, after which the sbuf and rb8 are loaded and ri is set. however certain conditions must be met before the loading and setting of ri can be d one. 1. ri must be 0 and 2. either sm2 = 0, or the received stop bit = 1. if these conditions are met, then the stop bit goes to rb8, the 8 data bits go into sbuf and ri is set. otherwise the received frame may be lost. after the middle of the stop bit, the receiver goes back to looking for a 1 - to - 0 transition on the rxd pin. sbuf rb8 transmit shift register receive shift register tx shift parout d8 internal data bus internal data bus txd rxd serial port interrupt smod= (smod_1) tclk rclk sample write to sbuf tx start sout 0 1 0 1 ti 1 0 parin stop start load clock read sbuf timer 2 overflow (for serial port 0 only) timer 1 overflow tx clock ri serial controller rx clock load sbuf rx start rx shift 2 16 1-to-0 detector bit detector 16 clock sin figure 21. serial port mode 1
p reliminary W77IE58 publication release date: july 2000 - 71 - revision a1 mode 2 this mode uses a total of 11 bits in asynchronous full - duplex communication. the functional description is shown in the f igure below. the frame consists of one start bit (0), 8 data bits (lsb first), a programmable 9th bit (tb8) and a stop bit (0). the 9th bit received is put into rb8. the baud rate is programmable to 1/32 or 1/64 of the oscillator frequency, which is determ ined by the smod bit in pcon sfr. transmission begins with a write to sbuf. the serial data is brought out on to txd pin at c1 following the first roll - over of the divide by 16 counter. the next bit is placed on txd pin at c1 following the next rollover of the divide by 16 counter. thus the transmission is synchronized to the divide by 16 counter, and not directly to the write to sbuf signal. after all 9 bits of data are transmitted, the stop bit is transmitted. the ti flag is set in the c1 state after the stop bit has been put out on txd pin. this will be at the 11th rollover of the divide by 16 counter after a write to sbuf. reception is enabled only if ren is high. the serial port actually starts the receiving of serial data, with the detection of a falli ng edge on the rxd pin. the 1 - to - 0 detector continuously monitors the rxd line, sampling it at the rate of 16 times the selected baud rate. when a falling edge is detected, the divide by 16 counter is immediately reset. this helps to align the bit boundari es with the rollovers of the divide by 16 counter. the 16 states of the counter effectively divide the bit time into 16 slices. the bit detection is done on a best of three basis. the bit detector samples the rxd pin, at the 8th, 9th and 10th counter state s. by using a majority 2 of 3 voting system, the bit value is selected. this is done to improve the noise rejection feature of the serial port. sbuf rb8 transmit shift register receive shift register tx shift parout d8 internal data bus internal data bus txd rxd serial port interrupt smod= (smod_1) sample write to sbuf tx start sout 0 1 ti parin stop start load clock read sbuf tx clock ri serial controller rx clock load sbuf rx start rx shift 2 16 1-to-0 detector bit detector 16 clock sin d8 tb8 clock source mode input div. by 4 osc/2 div. by 64 osc/32 div. by 1024 osc/512 figure 22. serial port mode 2 if the first bit detected after the falling edge of rxd pin, is not 0, then this indicates an invalid start bit, and the reception is immediately aborted. the serial port again looks for a falling edge in the rxd line. if a valid start bit is detected, then the rest of the bits are also detected and shifted into the sbuf. after
p reliminary W77IE58 - 72 - shifting in 9 data bits, there is one more shift to do, after which the sbuf and rb8 are loaded and ri is set. however certain conditions must be met before the loading and setting of ri can be done. 1. ri must be 0 and 2. either sm2 = 0, or t he received stop bit = 1. if these conditions are met, then the stop bit goes to rb8, the 8 data bits go into sbuf and ri is set. otherwise the received frame may be lost. after the middle of the stop bit, the receiver goes back to looking for a 1 - to - 0 tra nsition on the rxd pin. mode 3 this mode is similar to mode 2 in all respects, except that the baud rate is programmable. the user must first initialize the serial related sfr scon before any communication can take place. this involves selection of the mod e and baud rate. the timer 1 should also be initialized if modes 1 and 3 are used. in all four modes, transmission is started by any instruction that uses sbuf as a destination register. reception is initiated in mode 0 by the condition ri = 0 and ren = 1. this will generate a clock on the txd pin and shift in 8 bits on the rxd pin. reception is initiated in the other modes by the incoming start bit if ren = 1. the external device will start the communication by transmitting the start bit. sbuf rb8 transmit shift register receive shift register tx shift parout d8 internal data bus internal data bus txd rxd serial port interrupt smod= (smod_1) tclk rclk sample write to sbuf tx start sout 0 1 0 1 ti 1 0 parin stop start load clock read sbuf timer 2 overflow (for serial port 0 only) timer 1 overflow tx clock ri serial controller rx clock load sbuf rx start rx shift 2 16 1-to-0 detector bit detector 16 clock sin d8 tb8 figure 23. serial port mode 3 table 10. serial ports modes sm1 sm0 mode type baud clock frame size start bit stop bit 9th bit function 0 0 0 synch. 4 or 12 t clks 8 bits no no none 0 1 1 asynch. timer 1 or 2 10 bits 1 1 none 1 0 2 asynch. 32 or 64 t clks 11 bits 1 1 0, 1 1 1 3 asynch. timer 1 or 2 11 bits 1 1 0, 1
p reliminary W77IE58 publication release date: july 2000 - 73 - revision a1
p reliminary W77IE58 - 74 - framing error detection a frame error occurs when a valid stop bit is not detected. this could indicate incorrect serial data communication. typically the frame error is due to noise and contention on the serial communication line. the W77IE58 has the facility to detect such framing errors and set a flag which can be checked by software. the frame error fe(fe_1) bit is located in scon.7(scon1.7). this bit is normally used as sm0 in the st andard 8051 family. however, in the W77IE58 it serves a dual function and is called sm0/fe (sm0_1/fe_1). there are actually two separate flags, one for sm0 and the other for fe. the flag that is actually accessed as scon.7(scon1.7) is determined by smod0 ( pcon.6) bit. when smod0 is set to 1, then the fe flag is indicated in sm0/fe. when smod0 is set to 0, then the sm0 flag is indicated in sm0/fe. the fe bit is set to 1 by hardware but must be cleared by software. note that smod0 must be 1 while reading or w riting to fe or fe_1. if fe is set, then any following frames received without any error will not clear the fe flag. the clearing has to be done by software. multiprocessor communications multiprocessor communications makes use of the 9th data bit in modes 2 and 3. in the W77IE58, the ri flag is set only if the received byte corresponds to the given or broadcast address. this hardware feature eliminates the software overhead required in checking every received address, and greatly simplifies the software pr ogrammer task. in the multiprocessor communication mode, the address bytes are distinguished from the data bytes by transmitting the address with the 9th bit set high. when the master processor wants to transmit a block of data to one of the slaves, it fir st sends out the address of the targeted slave (or slaves). all the slave processors should have their sm2 bit set high when waiting for an address byte. this ensures that they will be interrupted only by the reception of a address byte. the automatic addr ess recognition feature ensures that only the addressed slave will be interrupted. the address comparison is done in hardware not software. the addressed slave clears the sm2 bit, thereby clearing the way to receive data bytes. with sm2 = 0, the slave will be interrupted on the reception of every single complete frame of data. the unaddressed slaves will be unaffected, as they will be still waiting for their address. in mode 1, the 9th bit is the stop bit, which is 1 in case of a valid frame. if sm2 is 1, t hen ri is set only if a valid frame is received and the received byte matches the given or broadcast address. the master processor can selectively communicate with groups of slaves by using the given address. all the slaves can be addressed together using the broadcast address. the addresses for each slave are defined by the saddr and saden sfrs. the slave address is an 8 - bit value specified in the saddr sfr. the saden sfr is actually a mask for the byte value in saddr. if a bit position in saden is 0, then the corresponding bit position in saddr is don't care. only those bit positions in saddr whose corresponding bits in saden are 1 are used to obtain the given address. this gives the user flexibility to address multiple slaves without changing the slave ad dress in saddr. the following example shows how the user can define the given address to address different slaves. slave 1: saddr 1010 0100 saden 1111 1010 given 1010 0x0x
p reliminary W77IE58 publication release date: july 2000 - 75 - revision a1 slave 2: saddr 1010 0111 saden 1111 1001 given 1010 0xx1 the given address fo r slave 1 and 2 differ in the lsb. for slave 1, it is a don't care, while for slave 2 it is 1. thus to communicate only with slave 1, the master must send an address with lsb = 0 (1010 0000). similarly the bit 1 position is 0 for slave 1 and don't care for slave 2. hence to communicate only with slave 2 the master has to transmit an address with bit 1 = 1 (1010 0011). if the master wishes to communicate with both slaves simultaneously, then the address must have bit 0 = 1 and bit 1 = 0. the bit 3 position i s don't care for both the slaves. this allows two different addresses to select both slaves (1010 0001 and 1010 0101). the master can communicate with all the slaves simultaneously with the broadcast address. this address is formed from the logical oring o f the saddr and saden sfrs. the zeros in the result are defined as don't cares in most cases the broadcast address is ffh. in the previous case, the broadcast address is (1111111x) for slave 1 and (11111111) for slave 2. the saddr and saden sfrs are locate d at address a9h and b9h respectively. on reset, these two sfrs are initialized to 00h. this results in given address and broadcast address being set as xxxx xxxx(i.e. all bits don't care). this effectively removes the multiprocessor communications feature , since any selectivity is disabled. timed access protect ion the W77IE58 has several new features, like the watchdog timer, on - chip rom size adjustment, wait state control signal and power on/fail reset flag, which are crucial to proper operation of the sy stem. if left unprotected, errant code may write to the watchdog control bits resulting in incorrect operation and loss of control. in order to prevent this, the W77IE58 has a protection scheme which controls the write access to critical bits. this protect ion scheme is done using a timed access. in this method, the bits which are to be protected have a timed write enable window. a write is successful only if this window is active, otherwise the write will be discarded. this write enable window is open for 3 machine cycles if certain conditions are met. after 3 machine cycles, this window automatically closes. the window is opened by writing aah and immediately 55h to the timed access(ta) sfr. this sfr is located at address c7h. the suggested code for opening the timed access window is ta reg 0c7h ; define new register ta, located at 0c7h mov ta, #0aah mov ta, #055h when the software writes aah to the ta sfr, a counter is started. this counter waits for 3 machine cycles looking for a write of 55h to ta. if the second write (55h) occurs within 3 machine cycles of the first write (aah), then the timed access window is opened. it remains open for 3 machine cycles, during which the user may write to the protected bits. once the window closes the procedure must be repeated to access the other protected bits. examples of timed assessing are shown below. example 1: valid access
p reliminary W77IE58 - 76 - mov ta, #0aah 3 m/c note: m/c = machine cycles mov ta, #055h 3 m/c mov wdcon, #00h 3 m/c example 2: valid access mov ta, #0aah 3 m/c mov ta, #055h 3 m/c nop 1 m/c setb ewt 2 m/c example 3: invalid access mov ta, #0aah 3 m/c mov ta, #055h 3 m/c nop 1 m/c nop 1 m/c clr por 2 m/c example 4: invalid access mov ta, #0aah 3 m/c nop 1 m/c mov ta, #055h 3 m/c setb ewt 2 m /c in the first two examples, the writing to the protected bits is done before the 3 machine cycle window closes. in example 3, however, the writing to the protected bit occurs after the window has closed, and so there is effectively no change in the stat us of the protected bit. in example 4, the second write to ta occurs 4 machine cycles after the first write, therefore the timed access window in not opened at all, and the write to the protected bit fails. on - chip flash rom ch aracteristics the W77IE58 ha s several modes to program the on - chip flash rom. all these operations are configured by the pins rst, ale, psen , a9ctrl(p3.0), a13ctrl(p3.1), a14ctrl(p3.2), oectrl(p3.3), ce (p3.6), oe (p3.7), a0( p1.0) and v pp ( ea ). moreover, the a15 - a0(p2.7 - p2.0, p1.7 - p1.0) and the d7 - d0(p0.7 - p0.0) serve as the address and data bus respectively for these operations. read operation this operation is supported for customer to read their code and the security bits. the data will not be valid if the lock bit is programmed to low. output disable condition when the oe is set to high, no data output appears on the d7..d0. program operation this operation is used to program the dat a to flash rom and the security bits. program operation is done when the v pp is reach to v cp (12.5v) level, ce set to low, and oe set to high.
p reliminary W77IE58 publication release date: july 2000 - 77 - revision a1 program verify operation all the programming data must be checked aft er program operations. this operation should be performed after each byte is programmed; it will ensure a substantial program margin. erase operation an erase operation is the only way to change data from 0 to 1. this operation will erase all the flash ro m cells and the security bits from 0 to 1. this erase operation is done when the v pp is reach to v ep level, ce set to low, and oe set to high. erase verify operation after an erase operation, all of the bytes in th e chip must be verified to check whether they have been successfully erased to 1 or not. the erase verify operation automatically ensures a substantial erase margin. this operation will be done after the erase operation if v pp = v ep (14.5v), ce is high and oe is low. program/erase inhibit operation this operation allows parallel erasing or programming of multiple chips with different data. when p3.6( ce ) = v ih , p3.7( oe ) = v ih , erasing or programming of non - targeted chips is inhibited. so, except for the p3.6 and p3.7 pins, the individual chips may have common inputs. company/device id read operation this operation is supported for flash rom programmer to get the company id or device id on the W77IE58. operations p3.0 (a9 ctrl) p3.1 (a13 ctrl) p3.2 (a14 ctrl) p3.3 (oe ctrl) p3.6 ( ce ) p3.7 ( oe ) ea (v pp ) p2,p1 (a15..a0) p0 (d7..d0) note read 0 0 0 0 0 0 1 address dat a out output disable 0 0 0 0 0 1 1 x hi - z program 0 0 0 0 0 1 v cp address data in program verify 0 0 0 0 1 0 v cp address data out @3 erase 1 0 0 0 0 1 v ep a0:0, others: x data in 0ffh @4 erase verify 1 0 0 0 1 0 v ep address data out @5 program/era se inhibit x 0 0 0 1 1 v cp / v ep x x company id 1 0 0 0 0 0 1 a0 = 0 data out device id 1 0 0 0 0 0 1 a0 = 1 data out notes: 1. all these operations happen in rst = v ih , ale = v il and psen = v ih . 2. v cp = 12.5v, v ep = 14.5v, v ih = v dd , v il = v ss . 3. the program verify operation follows behind the program operation. 4. this erase operation will erase all the on - chip rom cells and the security bits.
p reliminary W77IE58 - 78 - 5. the erase verify operation follows behind the erase operation. p1 p3.0 p3.1 p3.2 p3.3 p3.6 p3.7 x'tal1 x'tal2 p0 ea/vpp ale rst psen p2 vss vcc a0-a7 v cp v il v ih v il v il v il v il v il a8-a15 pgm data v ih v ih +5v programming configuration p1 p3.0 p3.1 p3.2 p3.3 p3.6 p3.7 x'tal1 x'tal2 p0 ea/vpp ale rst psen p2 vss vcc a0-a7 v cp v il v ih v il v il v il v il v il a8-a15 pgm data v ih v ih +5v programming verification security bits during the on - chip flash rom operation mode, the flash rom can be programmed and verified repeatedly. until the code inside the flash rom is confirmed ok, the code can be protected. the protection of flash rom and those operations on it are described below. the W77IE58 has several special setting registers, including the security register and company/device id registers, which can not be accessed in normal mode. these registers can only be accessed from the flash rom operation mode. those bit s of the security registers can not be changed once they have been programmed from high to low. they can only be reset through erase - all operation. the contents of the company id and device id registers have been set in factory. both registers are addresse d by the a0 address line during the same specific condition. the security register is addressed in the flash - rom operation mode by address #0ffffh. b0 b1 b0: lock bit, logic 0: active b1: movc inhibit, logic 0: the movc instruction in external memory cannot access the code in internal memory. logic1 : no restriction. default 1 for each bit. special setting registers company id (#dah) d7 d6 d5 d4 d3 d2 d1 d0 1 1 0 1 1 0 1 0 device id (#62h) 0 1 1 1 0 0 0 security bits 0 32kb mtp rom program memory reserved security register 0ffffh 0000h 7fffh seed 1 seed 0 0ff7fh 0ff3fh reserved on-chip b2 b2: seed 0 & 1 access inhibit b3 b3: this bit must be h. 32kb flash rom
p reliminary W77IE58 publication release date: july 2000 - 79 - revision a1 b0: lock bit this bit is used to protect the customer's program code in the W77IE58 . it may be set after the programmer finishes the programming and verifies sequence. once this bit is set to logic 0, both the flash rom data and special setting registers can not be accessed again. b1: movc inhibit this bit is used to restrict the acces sible region of the movc instruction. it can prevent the movc instruction in external program memory from reading the internal program code. when this bit is set to logic 0, a movc instruction in external program memory space will be able to access code on ly in the external memory, not in the internal memory. a movc instruction in internal program memory space will always be able to access the rom data in both internal and external memory. if this bit is logic 1, there are no restrictions on the movc instru ction. b2: encryption feature both the seed 0 and seed 1 are a one - byte flash memory cell that provide the user with encryption code protection. when program code is programmed to the W77IE58 internal flash rom and verify it is correct, then users can pro gram a non - ffh value into either seed 0 or seed 1 to start the encryption logic. when seed 0 or seed 1 is presented in non - ffh state, the internal encryption circuit will generate a sequence of random values, then add to each the program code bytes before they appear in the data bus. now the code is scrambled during the read or verify operation. the seed 0 and seed 1 have the initial value ffh after chip erased. when the encryption logic is effective, the user can not disable it except by erasing the chip to recover the seed 0 and 1 to initial value ffh. the method for programming seed 0 and seed 1 is the same as that used to program internal flash rom, except that the address of seed 0 is 0ff7fh, and seed 1 is 0ff3fh. when b2 bit is cleared, seed 0 and seed 1 can not be accessed. absolute maximum rat ings parameter symbol condition rating unit dc power supply v dd - v ss - 0.3 +7.0 v input voltage v in v ss - 0.3 v dd +0.3 v operating temperature t a - 40 +85 c storage temperatute tst - 55 +150 c note: expos ure to conditions beyond those listed under absolute maximum ratings may adversely affect the life and reliability of the device.
p reliminary W77IE58 - 80 - dc electrical charac teristics (fosc = 20 mhz, unless otherwise specified.) parameter symbol specification test conditions min. max. unit operating voltage v dd 2.7 5.5 v operating current i dd - 50 ma no load, v dd = rst = 5.5v 15 ma no load, v dd = rst = 3.0v idle current i idle - 20 ma no load, v dd = 5.5v 12 ma no load, v dd = 3.0v power down current i pwdn - 10 m a no load, v dd = 5.5v - 10 m a no load, v dd = 3.0v input current p1, p2, p3, p4 i in1 - 70 +10 m a v dd = 5.5v v in = 0v or v dd input current rst [*1] i in2 - 10 +300 m a v dd = 5.5v 0 p reliminary W77IE58 publication release date: july 2000 - 81 - revision a1 output high voltage p0, ale , psen [*2] v oh2 2.4 - v v dd = 4.5v, i oh = - 8 ma v dd = 3.0v, i oh = - 3 ma
p reliminary W77IE58 - 82 - notes: *1. rst pin is a schmitt trigger input. *2. p0, ale and psen are tested in the external access mode. *3. xtal1 is a cmos input. *4. pins of p1, p2, p3 can source a transition current when they are being externally driven from 1 to 0. the transition current reaches its maximum value when vin approximates to 2v. ac electrical charac teristics t clcl t clcx t chcx t clch t chcl note: duty cycle is 50%. e xternal clock characteristics parameter symbol min. typ. max. units notes clock high time t chcx 12.5 - - ns clock low time t clcx 12.5 - - ns clock rise time t clch - - 10 ns clock fall time t chcl - - 10 ns ac specification parameter symbol variable clock min. variable clock max. units oscillator frequency 1/t clcl 1/t clcl , 3v 0 25 mhz ale pulse width t lhll 1.5 t clcl - 5 ns address valid to ale low t avll 0.5 t clcl - 5 ns address hold after ale low t llax1 0.5 t clcl - 5 ns address hold after ale low for movx write t llax2 0.5 t clcl - 5 ns ale low to valid instruction in t lliv 2.5t clcl - 20 ns ale low to psen low t llpl 0.5 t clcl - 5 ns psen pulse width t plph 2.0 t clcl - 5 ns
p reliminary W77IE58 publication release date: july 2000 - 83 - revision a1 ac specification, continued parameter s ymbol variable clock min. variable clock max. units psen low to valid instruction in t pliv 2.0t clcl - 20 ns input instruction hold after psen t pxix 0 ns input instruction float after psen t pxiz t clcl - 5 ns port 0 address to valid instr. in t aviv1 3.0t clcl - 20 ns port 2 address to valid instr. in t aviv2 3.5t clcl - 20 ns psen low to address float t plaz 0 ns data hold after read t rhdx 0 ns data float after read t rhdz t clcl - 5 ns rd low to address float t rlaz 0.5t clcl - 5 ns movx characteristics using strech memory cycles parameter symbol variable clock min. variable clock max. units strech data access ale pulse width t llhl2 1.5 t clcl - 5 2.0 t clcl - 5 ns t mcs = 0 t mcs >0 address hold after ale low for movx write t llax2 0.5 t clcl - 5 ns rd pulse width t rlrh 2.0 t clcl - 5 t mcs - 10 ns t mcs = 0 t mcs >0 wr pulse width t wlwh 2.0 t clcl - 5 t mcs - 10 ns t mcs = 0 t mcs >0 rd low to valid data in t rldv 2.0 t clcl - 20 t mcs - 20 ns t mcs = 0 t mcs >0 data hold after read t rhdx 0 ns data float after read t rhdz t clcl - 5 2.0 t clcl - 5 ns t mcs = 0 t mcs >0 ale low to valid data in t lldv 2.5 t clcl - 5 t mcs + 2 t clcl - 40 ns t mc s = 0 t mcs >0 port 0 address to valid data in t avdv1 3.0 t clcl - 20 2.0 t clcl - 5 ns t mcs = 0 t mcs >0
p reliminary W77IE58 - 84 - movx characteristics using strech memory cycles, continued parameter symbol variable clock min. variable clock max. units strech ale low to rd or wr low t llwl 0.5 t clcl - 5 1.5 t clcl - 5 0.5 t clcl + 5 1.5 t clcl + 5 ns t mcs = 0 t mcs >0 port 0 address to rd or wr low t avwl t clcl - 5 2.0 t clcl - 5 ns t mcs = 0 t mcs >0 po rt 2 address to rd or wr low t avwl2 1.5 t clcl - 5 2.5 t clcl - 5 ns t mcs = 0 t mcs >0 data valid to wr transition t qvwx - 5 1.0 t clcl - 5 ns t mcs = 0 t mcs >0 data hold after write t whqx t clcl - 5 2.0 t clcl - 5 n s t mcs = 0 t mcs >0 rd low to address float t rlaz 0.5 t clcl - 5 ns rd or wr high to ale high t whlh 0 1.0 t clcl - 5 10 1.0 t clcl + 5 ns t mcs = 0 t mcs >0 note: t mcs is a time period related to the stretch memory cycle selection. the following table shows the time period of t mcs for each selection of the stretch value. m2 m1 m0 movx cycles t mcs 0 0 0 2 machine cycles 0 0 0 1 3 machine cycles 4 t clcl 0 1 0 4 machine cycles 8 t clcl 0 1 1 5 machine cycles 12 t c lcl 1 0 0 6 machine cycles 16 t clcl 1 0 1 7 machine cycles 20 t clcl 1 1 0 8 machine cycles 24 t clcl 1 1 1 9 machine cycles 28 t clcl explanation of logic symbols in order to maintain compatibility with the original 8051 family, this device specifies th e same parameter for each device, using the same symbols. the explanation of the symbols is as follows. t time a address c clock d input data h logic level high l logic level low i instruction p psen q output data r rd signal v valid w wr signal x no longer a valid state z tri - state
p reliminary W77IE58 publication release date: july 2000 - 85 - revision a1 timing waveforms program memory read cycle t llax1 t pxiz t plaz t llpl t pxix t pliv t aviv2 t aviv1 t plph t avll address a8-a15 address a8-a15 address a0-a7 instruction in address a0-a7 port 2 port 0 psen ale t lliv t lhll data memory read cycle t avll t avwl1 t llax1 t whlh t rldv t rlrh t rlaz t rhdz t rhdx t avdv2 t avdv1 t llwl address a8-a15 address a0-a7 instruction in data in address a0-a7 port 2 port 0 psen rd ale t lldv
p reliminary W77IE58 - 86 - timing waveforms, continued data m emory write cycle t avll t avwl1 t llax2 t whlh t wlwh t qvwx t whqx t avdv2 t llwl address a8-a15 address a0-a7 instruction in data out address a0-a7 port 2 port 0 psen wr ale
p reliminary W77IE58 publication release date: july 2000 - 87 - revision a1 typical application circuits expanded external program memory and crystal ad0 a0 a0 a0 10 a1 9 a2 8 a3 7 a4 6 a5 5 a6 4 a7 3 a8 25 a9 24 a10 21 a11 23 a12 2 a13 26 a14 27 a15 1 ce 20 oe 22 o0 11 o1 12 o2 13 o3 15 o4 16 o5 17 o6 18 o7 19 27512 ad0 d0 3 q0 2 d1 4 q1 5 d2 7 q2 6 d3 8 q3 9 d4 13 q4 12 d5 14 q5 15 d6 17 q6 16 d7 18 q7 19 oc 1 g 11 74373 ad0 ea 31 xtal1 19 xtal2 18 rst 9 int0 12 int1 13 t0 14 t1 15 p1.0 1 p1.1 2 p1.2 3 p1.3 4 p1.4 5 p1.5 6 p1.6 7 p1.7 8 39 38 37 36 35 34 33 32 21 22 23 24 25 26 27 28 17 wr p0.0 p0.1 p0.2 p0.3 p0.4 p0.5 p0.6 p0.7 p2.0 p2.1 p2.2 p2.3 p2.4 p2.5 p2.6 p2.7 rd 16 psen 29 ale 30 txd 11 rxd 10 W77IE58 10 u 8.2 k cc crystal c1 c2 r ad1 ad2 ad3 ad4 ad5 ad6 ad7 a8 ad1 ad2 ad3 ad4 ad5 ad6 ad7 gnd a1 a2 a3 a4 a5 a6 a7 a1 a2 a3 a4 a5 a6 a7 a8 a9 ad1 ad2 ad3 ad4 ad5 ad6 ad7 a10 a11 a12 a13 a14 a15 gnd a9 a10 a11 a12 a13 a14 a15 v cc v figure a crystal c1 c2 r 16 mhz 0 - 30p 0 - 30p - 24 mhz 0 - 15p 0 - 15p - the above table shows the reference values for crystal applications. note:c1, c2, r components refer to figure a.
p reliminary W77IE58 - 88 - typical application circuits, continued expanded external d ata memory and oscillator 10 u 8.2 k cc oscillator ea 31 xtal1 19 xtal2 18 rst 9 int0 12 int1 13 t0 14 t1 15 1 2 3 4 5 6 p1.0 p1.1 p1.2 p1.3 p1.4 p1.5 p1.6 7 p1.7 8 p0.0 39 p0.1 38 p0.2 37 p0.3 36 p0.4 35 p0.5 34 p0.6 33 p0.7 32 p2.0 21 p2.1 22 p2.2 23 p2.3 24 p2.4 25 p2.5 26 p2.6 27 p2.7 28 rd 17 wr 16 psen 29 ale 30 txd 11 rxd 10 W77IE58 ad0 ad1 ad2 ad3 ad4 ad5 ad6 ad7 ad0 ad1 ad2 ad3 ad4 ad5 ad6 ad7 a0 a1 a2 a3 a4 a5 a6 a7 d0 3 q0 2 d1 4 q1 5 d2 7 q2 6 d3 8 q3 9 d4 13 q4 12 d5 14 q5 15 d6 17 q6 16 d7 18 q7 19 oc 1 g 11 74373 a0 a1 a2 a3 a4 a5 a6 a7 10 9 8 7 6 5 4 3 a0 a1 a2 a3 a4 a5 a6 a7 ad0 ad1 ad2 ad3 ad4 ad5 ad6 ad7 11 12 13 15 16 17 18 19 d0 d1 d2 d3 d4 d5 d6 d7 a8 a9 a10 a11 a12 a13 a14 25 24 21 23 26 1 20 2 a8 a9 a10 a11 a12 a13 a14 ce gnd a8 a9 a10 a11 a12 a13 a14 gnd 22 27 oe wr 20256 v cc v figure b package dimensions 40 - pin dip seating plane 1. dimension d max. & s include mold flash or tie bar burrs. 2. dimension e1 does not include interlead flash. 3. dimension d & e1 include mold mismatch and are determined at the mold parting line. 6. general appearance spec. should be based on final visual inspection spec. . 1.372 1.219 0.054 0.048 notes: symbol min. nom. max. max. nom. min. dimension in inches dimension in mm a b c d e a l s a a 1 2 e 0.050 1.27 0.210 5.334 0.010 0.150 0.016 0.155 0.018 0.160 0.022 3.81 0.406 0.254 3.937 0.457 4.064 0.559 0.008 0.120 0.670 0.010 0.130 0.014 0.140 0.203 3.048 0.254 3.302 0.356 3.556 0.540 0.550 0.545 13.72 13.97 13.84 17.01 15.24 14.986 15.494 0.600 0.590 0.610 2.286 2.54 2.794 0.090 0.100 0.110 b 1 1 e e 1 a 2.055 2.070 52.20 52.58 0 15 0.090 2.286 0.650 0.630 16.00 16.51 protrusion/intrusion. 4. dimension b1 does not include dambar 5. controlling dimension: inches. 15 0 e a a a c e base plane 1 a 1 e l a s 1 e d 1 b b 40 21 20 1 2
p reliminary W77IE58 publication release date: july 2000 - 89 - revision a1 package dimensions, continued 44 - pin plcc 44 40 39 29 28 18 17 7 6 1 l c 1 b 2 a h d d e b e h e y a a 1 seating plane d g g e q symbol min. nom. max. max. nom. min. dimension in inches dimension in mm a b c d e h e l y a a 1 2 e b 1 h d g g d e notes: on final visual inspection spec. 4. general appearance spec. should be based 3. controlling dimension: inches protrusion/intrusion. 2. dimension b1 does not include dambar flash. 1. dimension d & e do not include interlead 0.020 0.145 0.026 0.016 0.008 0.648 0.590 0.680 0.090 0.150 0.028 0.018 0.010 0.653 0.610 0.690 0.100 0.050 bsc 0.185 0.155 0.032 0.022 0.014 0.658 0.630 0.700 0.110 0.004 0.508 3.683 0.66 0.406 0.203 16.46 14.99 17.27 2.296 3.81 0.711 0.457 0.254 16.59 15.49 17.53 2.54 1.27 4.699 3.937 0.813 0.559 0.356 16.71 16.00 17.78 2.794 0.10 bsc 16.71 16.59 16.46 0.658 0.653 0.648 16.00 15.49 14.99 0.630 0.610 0.590 17.78 17.53 17.27 0.700 0.690 0.680
p reliminary W77IE58 - 90 - headquarters no. 4, creation rd. iii, science - based industrial park, hsinchu, taiwan tel: 886 - 3 - 5770066 fax: 886 - 3 - 5792766 http://www.winbond.com.tw/ voice & fax - on - demand: 886 - 2 - 27197006 taipei office 11f, no. 115, sec. 3, min - sheng east rd., taipei, taiwan tel: 886 - 2 - 27190505 fax: 886 - 2 - 27197502 winbond electronics (h.k.) ltd. unit 9 - 15, 22f, millennium city, no. 378 kwun tong rd; kowloon, hong kong tel: 852 - 27513100 fax: 852 - 27552064 winbond electronics north america corp. winbond memory lab. winbond microelectronics corp. winbond systems lab. 2727 n. first street, san jose, ca 95134, u.s.a. tel: 408 - 9436666 fax: 408 - 5441798 note: all data and specifications are subject to change withou t notice. headquarters no. 4, creation rd. iii, science - based industrial park, hsinchu, taiwan tel: 886 - 3 - 5770066 fax: 886 - 3 - 5792766 http://www.winbond.com.tw/ voice & fax - on - demand: 886 - 2 - 27197006 taipei office 11f, no. 115, sec. 3, min - sheng east rd., taipei, taiwan tel: 886 - 2 - 27190505 fax: 886 - 2 - 27197502 winbond electronics (h.k.) ltd. unit 9 - 15, 22f, millennium city, no. 378 kwun tong rd; kowloon, hong kong tel: 852 - 27513100 fax: 852 - 27552064 winbond electronics north america corp. winbond memory lab. winbond microelectronics corp. winbond systems lab. 2727 n. first street, san jose, ca 95134, u.s.a. tel: 408 - 9436666 fax: 408 - 5441798 note: all data and specifications are subject to change withou t notice.


▲Up To Search▲   

 
Price & Availability of W77IE58

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X